From a3af33a82faf7fc2b8632a47147acdd4bd849f71 Mon Sep 17 00:00:00 2001 From: Thomas Letan Date: Fri, 25 Feb 2022 13:46:09 +0100 Subject: [PATCH] Proto,tx_rollup: Make rollup level great again --- .../lib_client/client_proto_context.ml | 115 +++- .../lib_client/client_proto_context.mli | 77 +++ src/proto_alpha/lib_client/injection.ml | 14 +- src/proto_alpha/lib_client/mockup.ml | 19 +- .../lib_client/operation_result.ml | 91 ++- .../client_proto_context_commands.ml | 248 ++++++++- .../lib_parameters/default_parameters.ml | 2 + src/proto_alpha/lib_protocol/TEZOS_PROTOCOL | 4 +- src/proto_alpha/lib_protocol/alpha_context.ml | 9 +- .../lib_protocol/alpha_context.mli | 235 +++++--- src/proto_alpha/lib_protocol/apply.ml | 93 ++-- src/proto_alpha/lib_protocol/apply_results.ml | 229 +++++++- .../lib_protocol/apply_results.mli | 16 +- .../lib_protocol/constants_repr.ml | 7 +- .../lib_protocol/constants_repr.mli | 3 + .../lib_protocol/constants_storage.ml | 4 + .../lib_protocol/constants_storage.mli | 2 + src/proto_alpha/lib_protocol/dune.inc | 20 +- .../lib_protocol/operation_repr.ml | 139 ++++- .../lib_protocol/operation_repr.mli | 44 +- src/proto_alpha/lib_protocol/raw_context.ml | 18 + src/proto_alpha/lib_protocol/raw_context.mli | 8 + src/proto_alpha/lib_protocol/storage.ml | 11 +- src/proto_alpha/lib_protocol/storage.mli | 44 +- .../lib_protocol/test/helpers/block.ml | 12 +- .../lib_protocol/test/helpers/context.ml | 3 + .../lib_protocol/test/helpers/context.mli | 7 +- .../lib_protocol/test/helpers/op.ml | 18 +- .../lib_protocol/test/helpers/op.mli | 15 +- .../integration/operations/test_tx_rollup.ml | 385 +++++-------- .../lib_protocol/ticket_operations_diff.ml | 4 +- .../lib_protocol/tx_rollup_commitment_repr.ml | 141 +---- .../tx_rollup_commitment_repr.mli | 29 +- .../tx_rollup_commitment_storage.ml | 336 ++++++------ .../tx_rollup_commitment_storage.mli | 83 +-- .../lib_protocol/tx_rollup_errors_repr.ml | 309 +++++++++++ .../lib_protocol/tx_rollup_inbox_repr.ml | 24 +- .../lib_protocol/tx_rollup_inbox_repr.mli | 20 +- .../lib_protocol/tx_rollup_inbox_storage.ml | 239 +++----- .../lib_protocol/tx_rollup_inbox_storage.mli | 93 ++-- .../lib_protocol/tx_rollup_level_repr.ml | 30 + .../lib_protocol/tx_rollup_level_repr.mli | 62 +++ .../lib_protocol/tx_rollup_repr.ml | 10 +- .../lib_protocol/tx_rollup_repr.mli | 2 + .../lib_protocol/tx_rollup_services.ml | 47 +- .../lib_protocol/tx_rollup_services.mli | 6 +- .../lib_protocol/tx_rollup_state_repr.ml | 448 +++++++++++---- .../lib_protocol/tx_rollup_state_repr.mli | 140 ++++- .../lib_protocol/tx_rollup_state_storage.ml | 51 +- .../lib_protocol/tx_rollup_state_storage.mli | 12 - .../lib_protocol/tx_rollup_storage.ml | 40 +- tests_python/tests_alpha/test_mockup.py | 1 + .../_regressions/rpc/alpha.client.mempool.out | 407 +++++++++++++- tezt/_regressions/rpc/alpha.client.others.out | 2 +- tezt/_regressions/rpc/alpha.light.others.out | 2 +- tezt/_regressions/rpc/alpha.proxy.mempool.out | 407 +++++++++++++- tezt/_regressions/rpc/alpha.proxy.others.out | 2 +- .../rpc/alpha.proxy_server.others.out | 2 +- .../tx_rollup_finalize_commitment_future.out | 45 ++ ...tx_rollup_finalize_commitment_no_batch.out | 18 + ...llup_finalize_commitment_no_commitment.out | 45 ++ ..._rollup_finalize_too_recent_commitment.out | 78 +++ .../tx_rollup_limit_empty_batch.out | 4 +- .../tx_rollup_limit_maximum_size_batch.out | 4 +- .../tx_rollup_limit_maximum_size_inbox.out | 82 +-- .../_regressions/tx_rollup_rpc_commitment.out | 27 +- tezt/_regressions/tx_rollup_rpc_inbox.out | 6 +- ..._rollup_rpc_pending_bonded_commitments.out | 62 +++ tezt/_regressions/tx_rollup_rpc_state.out | 5 +- tezt/lib_tezos/RPC.ml | 42 +- tezt/lib_tezos/RPC.mli | 11 +- tezt/lib_tezos/client.ml | 70 ++- tezt/lib_tezos/client.mli | 39 ++ tezt/lib_tezos/rollup.ml | 61 ++- tezt/lib_tezos/rollup.mli | 27 +- tezt/lib_tezos/tezos_regression.ml | 1 + tezt/tests/tx_rollup.ml | 518 ++++++++++++++---- tezt/tests/tx_rollup_node.ml | 4 +- 78 files changed, 4407 insertions(+), 1583 deletions(-) create mode 100644 src/proto_alpha/lib_protocol/tx_rollup_errors_repr.ml create mode 100644 src/proto_alpha/lib_protocol/tx_rollup_level_repr.ml create mode 100644 src/proto_alpha/lib_protocol/tx_rollup_level_repr.mli create mode 100644 tezt/_regressions/tx_rollup_finalize_commitment_future.out create mode 100644 tezt/_regressions/tx_rollup_finalize_commitment_no_batch.out create mode 100644 tezt/_regressions/tx_rollup_finalize_commitment_no_commitment.out create mode 100644 tezt/_regressions/tx_rollup_finalize_too_recent_commitment.out create mode 100644 tezt/_regressions/tx_rollup_rpc_pending_bonded_commitments.out diff --git a/src/proto_alpha/lib_client/client_proto_context.ml b/src/proto_alpha/lib_client/client_proto_context.ml index 9d0560598274..61456cc179c1 100644 --- a/src/proto_alpha/lib_client/client_proto_context.ml +++ b/src/proto_alpha/lib_client/client_proto_context.ml @@ -862,7 +862,7 @@ let submit_tx_rollup_commitment (cctxt : #full) ~chain ~block ?confirmations ?dry_run ?verbose_signing ?simulation ?fee ?gas_limit ?storage_limit ?counter ~source ~src_pk ~src_sk ~fee_parameter ~level ~inbox_hash ~batches ~predecessor ~tx_rollup () = - Environment.wrap_tzresult (Raw_level.of_int32 level) >>?= fun level -> + Environment.wrap_tzresult (Tx_rollup_level.of_int32 level) >>?= fun level -> List.map_es (fun root -> match Hex.to_bytes (`Hex root) with @@ -876,9 +876,7 @@ let submit_tx_rollup_commitment (cctxt : #full) ~chain ~block ?confirmations >>=? fun batches -> let predecessor = Option.map - (fun pred_str -> - Tx_rollup_commitment.Commitment_hash.of_bytes_exn - (Bytes.of_string pred_str)) + (fun pred_str -> Tx_rollup_commitment_hash.of_b58check_exn pred_str) predecessor in let inbox_hash = Tx_rollup_inbox.hash_of_b58check_exn inbox_hash in @@ -916,6 +914,115 @@ let submit_tx_rollup_commitment (cctxt : #full) ~chain ~block ?confirmations | Apply_results.Single_and_result ((Manager_operation _ as op), result) -> return (oph, op, result) +let submit_tx_rollup_finalize_commitment (cctxt : #full) ~chain ~block + ?confirmations ?dry_run ?verbose_signing ?simulation ?fee ?gas_limit + ?storage_limit ?counter ~source ~src_pk ~src_sk ~fee_parameter ~tx_rollup () + = + let contents : + Kind.tx_rollup_finalize_commitment + Annotated_manager_operation.annotated_list = + Annotated_manager_operation.Single_manager + (Injection.prepare_manager_operation + ~fee:(Limit.of_option fee) + ~gas_limit:(Limit.of_option gas_limit) + ~storage_limit:(Limit.of_option storage_limit) + (Tx_rollup_finalize_commitment {tx_rollup})) + in + Injection.inject_manager_operation + cctxt + ~chain + ~block + ?confirmations + ?dry_run + ?verbose_signing + ?simulation + ?counter + ~source + ~fee:(Limit.of_option fee) + ~storage_limit:(Limit.of_option storage_limit) + ~gas_limit:(Limit.of_option gas_limit) + ~src_pk + ~src_sk + ~fee_parameter + contents + >>=? fun (oph, op, result) -> + match Apply_results.pack_contents_list op result with + | Apply_results.Single_and_result ((Manager_operation _ as op), result) -> + return (oph, op, result) + +let submit_tx_rollup_remove_commitment (cctxt : #full) ~chain ~block + ?confirmations ?dry_run ?verbose_signing ?simulation ?fee ?gas_limit + ?storage_limit ?counter ~source ~src_pk ~src_sk ~fee_parameter ~tx_rollup () + = + let contents : + Kind.tx_rollup_remove_commitment + Annotated_manager_operation.annotated_list = + Annotated_manager_operation.Single_manager + (Injection.prepare_manager_operation + ~fee:(Limit.of_option fee) + ~gas_limit:(Limit.of_option gas_limit) + ~storage_limit:(Limit.of_option storage_limit) + (Tx_rollup_remove_commitment {tx_rollup})) + in + Injection.inject_manager_operation + cctxt + ~chain + ~block + ?confirmations + ?dry_run + ?verbose_signing + ?simulation + ?counter + ~source + ~fee:(Limit.of_option fee) + ~storage_limit:(Limit.of_option storage_limit) + ~gas_limit:(Limit.of_option gas_limit) + ~src_pk + ~src_sk + ~fee_parameter + contents + >>=? fun (oph, op, result) -> + match Apply_results.pack_contents_list op result with + | Apply_results.Single_and_result ((Manager_operation _ as op), result) -> + return (oph, op, result) + +let submit_tx_rollup_rejection (cctxt : #full) ~chain ~block ?confirmations + ?dry_run ?verbose_signing ?simulation ?fee ?gas_limit ?storage_limit + ?counter ~source ~src_pk ~src_sk ~fee_parameter ~level ~tx_rollup ~message + ~message_position ~proof () = + Environment.wrap_tzresult (Tx_rollup_level.of_int32 level) >>?= fun level -> + let contents : + Kind.tx_rollup_rejection Annotated_manager_operation.annotated_list = + Annotated_manager_operation.Single_manager + (Injection.prepare_manager_operation + ~fee:(Limit.of_option fee) + ~gas_limit:(Limit.of_option gas_limit) + ~storage_limit:(Limit.of_option storage_limit) + (Tx_rollup_rejection + {tx_rollup; level; message; message_position; proof})) + in + Injection.inject_manager_operation + cctxt + ~chain + ~block + ?confirmations + ?dry_run + ?verbose_signing + ?simulation + ?counter + ~source + ~fee:(Limit.of_option fee) + ~storage_limit:(Limit.of_option storage_limit) + ~gas_limit:(Limit.of_option gas_limit) + ~src_pk + ~src_sk + ~fee_parameter + contents + >>=? fun (oph, op, result) -> + match Apply_results.pack_contents_list op result with + | Apply_results.Single_and_result ((Manager_operation _ as op), result) -> + return (oph, op, result) + let sc_rollup_originate (cctxt : #full) ~chain ~block ?confirmations ?dry_run ?verbose_signing ?simulation ?fee ?gas_limit ?storage_limit ?counter ~source ~kind ~boot_sector ~src_pk ~src_sk ~fee_parameter () = diff --git a/src/proto_alpha/lib_client/client_proto_context.mli b/src/proto_alpha/lib_client/client_proto_context.mli index 708627899474..81a15ebbf2a7 100644 --- a/src/proto_alpha/lib_client/client_proto_context.mli +++ b/src/proto_alpha/lib_client/client_proto_context.mli @@ -494,6 +494,83 @@ val submit_tx_rollup_commitment : tzresult Lwt.t +val submit_tx_rollup_finalize_commitment : + #Protocol_client_context.full -> + chain:Shell_services.chain -> + block:Shell_services.block -> + ?confirmations:int -> + ?dry_run:bool -> + ?verbose_signing:bool -> + ?simulation:bool -> + ?fee:Tez.tez -> + ?gas_limit:Gas.Arith.integral -> + ?storage_limit:Z.t -> + ?counter:Z.t -> + source:Signature.public_key_hash -> + src_pk:Signature.public_key -> + src_sk:Client_keys.sk_uri -> + fee_parameter:Injection.fee_parameter -> + tx_rollup:Tx_rollup.t -> + unit -> + (Operation_hash.t + * Kind.tx_rollup_finalize_commitment Kind.manager contents + * Kind.tx_rollup_finalize_commitment Kind.manager + Apply_results.contents_result) + tzresult + Lwt.t + +val submit_tx_rollup_remove_commitment : + #Protocol_client_context.full -> + chain:Shell_services.chain -> + block:Shell_services.block -> + ?confirmations:int -> + ?dry_run:bool -> + ?verbose_signing:bool -> + ?simulation:bool -> + ?fee:Tez.tez -> + ?gas_limit:Gas.Arith.integral -> + ?storage_limit:Z.t -> + ?counter:Z.t -> + source:Signature.public_key_hash -> + src_pk:Signature.public_key -> + src_sk:Client_keys.sk_uri -> + fee_parameter:Injection.fee_parameter -> + tx_rollup:Tx_rollup.t -> + unit -> + (Operation_hash.t + * Kind.tx_rollup_remove_commitment Kind.manager contents + * Kind.tx_rollup_remove_commitment Kind.manager Apply_results.contents_result) + tzresult + Lwt.t + +val submit_tx_rollup_rejection : + #Protocol_client_context.full -> + chain:Shell_services.chain -> + block:Shell_services.block -> + ?confirmations:int -> + ?dry_run:bool -> + ?verbose_signing:bool -> + ?simulation:bool -> + ?fee:Tez.tez -> + ?gas_limit:Gas.Arith.integral -> + ?storage_limit:Z.t -> + ?counter:Z.t -> + source:Signature.public_key_hash -> + src_pk:Signature.public_key -> + src_sk:Client_keys.sk_uri -> + fee_parameter:Injection.fee_parameter -> + level:int32 -> + tx_rollup:Tx_rollup.t -> + message:string -> + message_position:int -> + proof:bool -> + unit -> + (Operation_hash.t + * Kind.tx_rollup_rejection Kind.manager contents + * Kind.tx_rollup_rejection Kind.manager Apply_results.contents_result) + tzresult + Lwt.t + val sc_rollup_originate : #Protocol_client_context.full -> chain:Chain_services.chain -> diff --git a/src/proto_alpha/lib_client/injection.ml b/src/proto_alpha/lib_client/injection.ml index 62bd3bd048f0..d2fda0d10911 100644 --- a/src/proto_alpha/lib_client/injection.ml +++ b/src/proto_alpha/lib_client/injection.ml @@ -330,7 +330,11 @@ let estimated_gas_single (type kind) | Applied (Tx_rollup_commit_result {consumed_gas; _}) -> Ok consumed_gas | Applied (Tx_rollup_return_bond_result {consumed_gas; _}) -> Ok consumed_gas - | Applied (Tx_rollup_finalize_result {consumed_gas; _}) -> Ok consumed_gas + | Applied (Tx_rollup_finalize_commitment_result {consumed_gas; _}) -> + Ok consumed_gas + | Applied (Tx_rollup_remove_commitment_result {consumed_gas; _}) -> + Ok consumed_gas + | Applied (Tx_rollup_rejection_result {consumed_gas; _}) -> Ok consumed_gas | Applied (Sc_rollup_originate_result {consumed_gas; _}) -> Ok consumed_gas | Applied (Sc_rollup_add_messages_result {consumed_gas; _}) -> Ok consumed_gas @@ -381,7 +385,9 @@ let estimated_storage_single (type kind) ~tx_rollup_origination_size Ok Z.zero | Applied (Tx_rollup_commit_result _) -> Ok Z.zero | Applied (Tx_rollup_return_bond_result _) -> Ok Z.zero - | Applied (Tx_rollup_finalize_result _) -> Ok Z.zero + | Applied (Tx_rollup_finalize_commitment_result _) -> Ok Z.zero + | Applied (Tx_rollup_remove_commitment_result _) -> Ok Z.zero + | Applied (Tx_rollup_rejection_result _) -> Ok Z.zero | Applied (Sc_rollup_originate_result {size; _}) -> Ok size | Applied (Sc_rollup_add_messages_result _) -> Ok Z.zero | Skipped _ -> assert false @@ -437,7 +443,9 @@ let originated_contracts_single (type kind) | Applied (Tx_rollup_submit_batch_result _) -> Ok [] | Applied (Tx_rollup_commit_result _) -> Ok [] | Applied (Tx_rollup_return_bond_result _) -> Ok [] - | Applied (Tx_rollup_finalize_result _) -> Ok [] + | Applied (Tx_rollup_finalize_commitment_result _) -> Ok [] + | Applied (Tx_rollup_remove_commitment_result _) -> Ok [] + | Applied (Tx_rollup_rejection_result _) -> Ok [] | Applied (Sc_rollup_originate_result _) -> Ok [] | Applied (Sc_rollup_add_messages_result _) -> Ok [] | Skipped _ -> assert false diff --git a/src/proto_alpha/lib_client/mockup.ml b/src/proto_alpha/lib_client/mockup.ml index 95368fe0c39c..c264ab324504 100644 --- a/src/proto_alpha/lib_client/mockup.ml +++ b/src/proto_alpha/lib_client/mockup.ml @@ -79,6 +79,7 @@ module Protocol_constants_overrides = struct tx_rollup_commitment_bond : Tez.t option; tx_rollup_finality_period : int option; tx_rollup_max_unfinalized_levels : int option; + tx_rollup_withdraw_period : int option; sc_rollup_enable : bool option; sc_rollup_origination_size : int option; (* Additional, "bastard" parameters (they are not protocol constants but partially treated the same way). *) @@ -136,7 +137,8 @@ module Protocol_constants_overrides = struct c.tx_rollup_hard_size_limit_per_message, c.tx_rollup_commitment_bond, c.tx_rollup_finality_period, - c.tx_rollup_max_unfinalized_levels ), + c.tx_rollup_max_unfinalized_levels, + c.tx_rollup_withdraw_period ), (c.sc_rollup_enable, c.sc_rollup_origination_size) ) ) ) ) ) )) (fun ( ( preserved_cycles, @@ -183,7 +185,8 @@ module Protocol_constants_overrides = struct tx_rollup_hard_size_limit_per_message, tx_rollup_commitment_bond, tx_rollup_finality_period, - tx_rollup_max_unfinalized_levels ), + tx_rollup_max_unfinalized_levels, + tx_rollup_withdraw_period ), (sc_rollup_enable, sc_rollup_origination_size) ) ) ) ) ) ) -> { @@ -229,6 +232,7 @@ module Protocol_constants_overrides = struct tx_rollup_commitment_bond; tx_rollup_finality_period; tx_rollup_max_unfinalized_levels; + tx_rollup_withdraw_period; sc_rollup_enable; sc_rollup_origination_size; chain_id; @@ -288,14 +292,15 @@ module Protocol_constants_overrides = struct (opt "cache_stake_distribution_cycles" int8) (opt "cache_sampler_state_cycles" int8)) (merge_objs - (obj7 + (obj8 (opt "tx_rollup_enable" Data_encoding.bool) (opt "tx_rollup_origination_size" int31) (opt "tx_rollup_hard_size_limit_per_inbox" int31) (opt "tx_rollup_hard_size_limit_per_message" int31) (opt "tx_rollup_commitment_bond" Tez.encoding) (opt "tx_rollup_finality_period" int31) - (opt "tx_rollup_max_unfinalized_levels" int31)) + (opt "tx_rollup_max_unfinalized_levels" int31) + (opt "tx_rollup_withdraw_period" int31)) (obj2 (opt "sc_rollup_enable" bool) (opt "sc_rollup_origination_size" int31)))))))) @@ -371,6 +376,7 @@ module Protocol_constants_overrides = struct tx_rollup_finality_period = Some parametric.tx_rollup_finality_period; tx_rollup_max_unfinalized_levels = Some parametric.tx_rollup_max_unfinalized_levels; + tx_rollup_withdraw_period = Some parametric.tx_rollup_withdraw_period; sc_rollup_enable = Some parametric.sc_rollup_enable; sc_rollup_origination_size = Some parametric.sc_rollup_origination_size; (* Bastard additional parameters. *) @@ -425,6 +431,7 @@ module Protocol_constants_overrides = struct tx_rollup_commitment_bond = None; tx_rollup_finality_period = None; tx_rollup_max_unfinalized_levels = None; + tx_rollup_withdraw_period = None; sc_rollup_enable = None; sc_rollup_origination_size = None; chain_id = None; @@ -845,6 +852,10 @@ module Protocol_constants_overrides = struct Option.value ~default:c.tx_rollup_max_unfinalized_levels o.tx_rollup_max_unfinalized_levels; + tx_rollup_withdraw_period = + Option.value + ~default:c.tx_rollup_withdraw_period + o.tx_rollup_withdraw_period; sc_rollup_enable = Option.value ~default:c.sc_rollup_enable o.sc_rollup_enable; sc_rollup_origination_size = diff --git a/src/proto_alpha/lib_client/operation_result.ml b/src/proto_alpha/lib_client/operation_result.ml index 0a5e8079fcde..60853e22dd95 100644 --- a/src/proto_alpha/lib_client/operation_result.ml +++ b/src/proto_alpha/lib_client/operation_result.ml @@ -213,18 +213,41 @@ let pp_manager_operation_content (type kind) source internal pp_result ppf source pp_result result - | Tx_rollup_finalize {tx_rollup; level} -> + | Tx_rollup_finalize_commitment {tx_rollup} -> Format.fprintf ppf - "@[%s:%a level %a @,From: %a%a@]" - (if internal then "Internal tx rollup finalize" - else "Tx rollup finalize") + "@[%s:%a @,From: %a%a@]" + (if internal then "Internal tx rollup finalize commitment" + else "Tx rollup finalize commitment") + Tx_rollup.pp + tx_rollup + Contract.pp + source + pp_result + result + | Tx_rollup_remove_commitment {tx_rollup} -> + Format.fprintf + ppf + "@[%s:%a @,From: %a%a@]" + (if internal then "Internal tx rollup remove commitment" + else "Tx rollup remove commitment") + Tx_rollup.pp + tx_rollup + Contract.pp + source + pp_result + result + | Tx_rollup_rejection {tx_rollup; _} -> + (* FIXME/TORU *) + Format.fprintf + ppf + "@[%s:%a @,From: %a%a@]" + (if internal then "Internal tx rollup rejection" + else "Tx rollup rejection") Tx_rollup.pp tx_rollup Contract.pp source - Raw_level.pp - level pp_result result | Sc_rollup_originate {kind; boot_sector} -> @@ -498,8 +521,30 @@ let pp_manager_operation_contents_and_result ppf balance_updates ; Format.fprintf ppf "@,Consumed gas: %a" Gas.Arith.pp consumed_gas in - let pp_tx_rollup_finalize_result - (Tx_rollup_finalize_result {balance_updates; consumed_gas}) = + let pp_tx_rollup_finalize_commitment_result + (Tx_rollup_finalize_commitment_result + {balance_updates; consumed_gas; level}) = + Format.fprintf + ppf + "@,Balance updates:@, %a" + pp_balance_updates + balance_updates ; + Format.fprintf ppf "@,Consumed gas: %a" Gas.Arith.pp consumed_gas ; + Format.fprintf ppf "@finalized level:@, %a" Tx_rollup_level.pp level + in + let pp_tx_rollup_remove_commitment_result + (Tx_rollup_remove_commitment_result + {balance_updates; consumed_gas; level}) = + Format.fprintf + ppf + "@,Balance updates:@, %a" + pp_balance_updates + balance_updates ; + Format.fprintf ppf "@,Consumed gas: %a" Gas.Arith.pp consumed_gas ; + Format.fprintf ppf "@finalized level:@, %a" Tx_rollup_level.pp level + in + let pp_tx_rollup_rejection_result + (Tx_rollup_rejection_result {balance_updates; consumed_gas}) = Format.fprintf ppf "@,Balance updates:@, %a" @@ -627,17 +672,39 @@ let pp_manager_operation_contents_and_result ppf "@[This tx rollup return commitment bond operation was \ BACKTRACKED, its expected effects (as follow) were NOT applied.@]" ; pp_tx_rollup_return_bond_result op - | Applied (Tx_rollup_finalize_result _ as op) -> + | Applied (Tx_rollup_finalize_commitment_result _ as op) -> Format.fprintf ppf "This tx rollup finalize operation was successfully applied" ; - pp_tx_rollup_finalize_result op - | Backtracked ((Tx_rollup_finalize_result _ as op), _err) -> + pp_tx_rollup_finalize_commitment_result op + | Backtracked ((Tx_rollup_finalize_commitment_result _ as op), _err) -> Format.fprintf ppf "@[This tx rollup finalize operation was BACKTRACKED, its \ expected effects (as follow) were NOT applied.@]" ; - pp_tx_rollup_finalize_result op + pp_tx_rollup_finalize_commitment_result op + | Applied (Tx_rollup_remove_commitment_result _ as op) -> + Format.fprintf + ppf + "This tx rollup remove operation was successfully applied" ; + pp_tx_rollup_remove_commitment_result op + | Backtracked ((Tx_rollup_remove_commitment_result _ as op), _err) -> + Format.fprintf + ppf + "@[This tx rollup remove operation was BACKTRACKED, its \ + expected effects (as follow) were NOT applied.@]" ; + pp_tx_rollup_remove_commitment_result op + | Applied (Tx_rollup_rejection_result _ as op) -> + Format.fprintf + ppf + "This tx rollup rejection operation was successfully applied" ; + pp_tx_rollup_rejection_result op + | Backtracked ((Tx_rollup_rejection_result _ as op), _err) -> + Format.fprintf + ppf + "@[This tx rollup rejection operation was BACKTRACKED, its \ + expected effects (as follow) were NOT applied.@]" ; + pp_tx_rollup_rejection_result op | Applied (Sc_rollup_originate_result _ as op) -> Format.fprintf ppf diff --git a/src/proto_alpha/lib_client_commands/client_proto_context_commands.ml b/src/proto_alpha/lib_client_commands/client_proto_context_commands.ml index c2fe113c00ed..db97dad7dcfe 100644 --- a/src/proto_alpha/lib_client_commands/client_proto_context_commands.ml +++ b/src/proto_alpha/lib_client_commands/client_proto_context_commands.ml @@ -98,6 +98,15 @@ let tx_rollup_param = ~desc:"The tx rollup address that we are sending this batch to." tx_rollup_parameter +let tx_rollup_proof_param = + Clic.param + ~name:"tx_rollup rejection proof" + ~desc:"The proof associated to the rejection operation" + (Clic.parameter (fun _ s -> + match bool_of_string_opt s with + | Some c -> return c + | None -> failwith "Parameter '%s' is not a boolean" s)) + let rollup_kind_param = Clic.parameter (fun _ name -> match Sc_rollups.from ~name with @@ -2314,7 +2323,6 @@ let commands_rw () = let predecessor = if String.equal predecessor "" then None else Some predecessor in - submit_tx_rollup_commitment cctxt ~chain:cctxt#chain @@ -2337,6 +2345,244 @@ let commands_rw () = ~predecessor () >>=? fun _res -> return_unit); + command + ~group + ~desc: + "Submit an optimistic transaction rollup finalise commitment operation." + (args12 + fee_arg + dry_run_switch + verbose_signing_switch + simulate_switch + minimal_fees_arg + minimal_nanotez_per_byte_arg + minimal_nanotez_per_gas_unit_arg + storage_limit_arg + counter_arg + force_low_fee_arg + fee_cap_arg + burn_cap_arg) + (prefixes ["submit"; "tx"; "rollup"; "finalize"; "commitment"] + @@ prefix "to" @@ tx_rollup_param @@ prefix "from" + @@ ContractAlias.destination_param + ~name:"src" + ~desc:"name of the account finalizing the commitment." + @@ stop) + (fun ( fee, + dry_run, + verbose_signing, + simulation, + minimal_fees, + minimal_nanotez_per_byte, + minimal_nanotez_per_gas_unit, + storage_limit, + counter, + force_low_fee, + fee_cap, + burn_cap ) + tx_rollup + (_, source) + cctxt -> + match Contract.is_implicit source with + | None -> failwith "Only implicit accounts can finalize commitments" + | Some source -> + Client_keys.get_key cctxt source >>=? fun (_, src_pk, src_sk) -> + let fee_parameter = + { + Injection.minimal_fees; + minimal_nanotez_per_byte; + minimal_nanotez_per_gas_unit; + force_low_fee; + fee_cap; + burn_cap; + } + in + submit_tx_rollup_finalize_commitment + cctxt + ~chain:cctxt#chain + ~block:cctxt#block + ?dry_run:(Some dry_run) + ?verbose_signing:(Some verbose_signing) + ?fee + ?storage_limit + ?counter + ?confirmations:cctxt#confirmations + ~simulation + ~source + ~src_pk + ~src_sk + ~fee_parameter + ~tx_rollup + () + >>=? fun _res -> return_unit); + command + ~group + ~desc: + "Submit an optimistic transaction rollup remove commitment operation." + (args12 + fee_arg + dry_run_switch + verbose_signing_switch + simulate_switch + minimal_fees_arg + minimal_nanotez_per_byte_arg + minimal_nanotez_per_gas_unit_arg + storage_limit_arg + counter_arg + force_low_fee_arg + fee_cap_arg + burn_cap_arg) + (prefixes ["submit"; "tx"; "rollup"; "remove"; "commitment"] + @@ prefix "to" @@ tx_rollup_param @@ prefix "from" + @@ ContractAlias.destination_param + ~name:"src" + ~desc:"name of the account removing the commitment." + @@ stop) + (fun ( fee, + dry_run, + verbose_signing, + simulation, + minimal_fees, + minimal_nanotez_per_byte, + minimal_nanotez_per_gas_unit, + storage_limit, + counter, + force_low_fee, + fee_cap, + burn_cap ) + tx_rollup + (_, source) + cctxt -> + match Contract.is_implicit source with + | None -> + failwith + "Only implicit accounts can remove transaction rollup commitments" + | Some source -> + Client_keys.get_key cctxt source >>=? fun (_, src_pk, src_sk) -> + let fee_parameter = + { + Injection.minimal_fees; + minimal_nanotez_per_byte; + minimal_nanotez_per_gas_unit; + force_low_fee; + fee_cap; + burn_cap; + } + in + submit_tx_rollup_remove_commitment + cctxt + ~chain:cctxt#chain + ~block:cctxt#block + ?dry_run:(Some dry_run) + ?verbose_signing:(Some verbose_signing) + ?fee + ?storage_limit + ?counter + ?confirmations:cctxt#confirmations + ~simulation + ~source + ~src_pk + ~src_sk + ~fee_parameter + ~tx_rollup + () + >>=? fun _res -> return_unit); + command + ~group + ~desc:"Submit an optimistic transaction rollup rejection operation." + (args12 + fee_arg + dry_run_switch + verbose_signing_switch + simulate_switch + minimal_fees_arg + minimal_nanotez_per_byte_arg + minimal_nanotez_per_gas_unit_arg + storage_limit_arg + counter_arg + force_low_fee_arg + fee_cap_arg + burn_cap_arg) + (prefixes + ["submit"; "tx"; "rollup"; "reject"; "commitment"; "at"; "level"] + @@ Clic.param + ~name:"level" + ~desc:"The level" + Client_proto_args.int_parameter + @@ prefix "message" + @@ Clic.param + ~name:"message" + ~desc:"the message being rejected" + Client_proto_args.string_parameter + @@ prefix "at" @@ prefix "position" + @@ Clic.param + ~name:"message_position" + ~desc:"position of the message being rejected in the inbox" + int_parameter + @@ prefix "with" @@ prefix "proof" @@ tx_rollup_proof_param @@ prefix "to" + @@ tx_rollup_param @@ prefix "from" + @@ ContractAlias.destination_param + ~name:"src" + ~desc:"name of the account rejecting the commitment." + @@ stop) + (fun ( fee, + dry_run, + verbose_signing, + simulation, + minimal_fees, + minimal_nanotez_per_byte, + minimal_nanotez_per_gas_unit, + storage_limit, + counter, + force_low_fee, + fee_cap, + burn_cap ) + level + message + message_position + proof + tx_rollup + (_, source) + cctxt -> + let level = Int32.of_int level in + match Contract.is_implicit source with + | None -> + failwith + "Only implicit accounts can reject transaction rollup commitments" + | Some source -> + Client_keys.get_key cctxt source >>=? fun (_, src_pk, src_sk) -> + let fee_parameter = + { + Injection.minimal_fees; + minimal_nanotez_per_byte; + minimal_nanotez_per_gas_unit; + force_low_fee; + fee_cap; + burn_cap; + } + in + submit_tx_rollup_rejection + cctxt + ~chain:cctxt#chain + ~block:cctxt#block + ?dry_run:(Some dry_run) + ?verbose_signing:(Some verbose_signing) + ?fee + ?storage_limit + ?counter + ?confirmations:cctxt#confirmations + ~simulation + ~source + ~src_pk + ~src_sk + ~fee_parameter + ~tx_rollup + ~level + ~message + ~message_position + ~proof + () + >>=? fun _res -> return_unit); command ~group ~desc:"Originate a new smart-contract rollup." diff --git a/src/proto_alpha/lib_parameters/default_parameters.ml b/src/proto_alpha/lib_parameters/default_parameters.ml index 996d5190b23b..ac0f211ed877 100644 --- a/src/proto_alpha/lib_parameters/default_parameters.ml +++ b/src/proto_alpha/lib_parameters/default_parameters.ml @@ -108,6 +108,8 @@ let constants_mainnet = tx_rollup_commitment_bond = Tez.of_mutez_exn 10_000_000_000L; tx_rollup_finality_period = 2_000; tx_rollup_max_unfinalized_levels = 2_100; + (* [60_000] blocks is about two weeks. *) + tx_rollup_withdraw_period = 60_000; sc_rollup_enable = false; (* The following value is chosen to prevent spam. *) sc_rollup_origination_size = 6_314; diff --git a/src/proto_alpha/lib_protocol/TEZOS_PROTOCOL b/src/proto_alpha/lib_protocol/TEZOS_PROTOCOL index 46bc20bd121a..15904e5306d6 100644 --- a/src/proto_alpha/lib_protocol/TEZOS_PROTOCOL +++ b/src/proto_alpha/lib_protocol/TEZOS_PROTOCOL @@ -44,13 +44,15 @@ "Contract_repr", "Indexable", "Entrypoint_repr", + "Tx_rollup_level_repr", "Tx_rollup_l2_address", "Tx_rollup_l2_qty", "Tx_rollup_repr", - "Tx_rollup_state_repr", "Tx_rollup_message_repr", "Tx_rollup_inbox_repr", "Tx_rollup_commitment_repr", + "Tx_rollup_errors_repr", + "Tx_rollup_state_repr", "Vote_repr", "Block_header_repr", "Destination_repr", diff --git a/src/proto_alpha/lib_protocol/alpha_context.ml b/src/proto_alpha/lib_protocol/alpha_context.ml index d577d1f3a1ae..ad628f407464 100644 --- a/src/proto_alpha/lib_protocol/alpha_context.ml +++ b/src/proto_alpha/lib_protocol/alpha_context.ml @@ -235,6 +235,9 @@ module Contract = struct module Internal_for_tests = Contract_repr end +module Tx_rollup_level = Tx_rollup_level_repr +module Tx_rollup_commitment_hash = Tx_rollup_commitment_repr.Commitment_hash + module Tx_rollup = struct include Tx_rollup_repr include Tx_rollup_storage @@ -282,13 +285,9 @@ end module Tx_rollup_commitment = struct include Tx_rollup_commitment_repr include Tx_rollup_commitment_storage - - module Internal_for_tests = struct - include Tx_rollup_commitment_repr - include Tx_rollup_commitment_storage - end end +module Tx_rollup_errors = Tx_rollup_errors_repr module Global_constants_storage = Global_constants_storage module Big_map = struct diff --git a/src/proto_alpha/lib_protocol/alpha_context.mli b/src/proto_alpha/lib_protocol/alpha_context.mli index 864643975637..6a4a9479df43 100644 --- a/src/proto_alpha/lib_protocol/alpha_context.mli +++ b/src/proto_alpha/lib_protocol/alpha_context.mli @@ -796,6 +796,7 @@ module Constants : sig tx_rollup_hard_size_limit_per_message : int; tx_rollup_commitment_bond : Tez.t; tx_rollup_finality_period : int; + tx_rollup_withdraw_period : int; tx_rollup_max_unfinalized_levels : int; sc_rollup_enable : bool; sc_rollup_origination_size : int; @@ -1949,6 +1950,26 @@ module Ticket_hash : sig (t * context) tzresult end +module Tx_rollup_level : sig + include BASIC_DATA + + type level = t + + val rpc_arg : level RPC_arg.arg + + val diff : level -> level -> int32 + + val root : level + + val succ : level -> level + + val pred : level -> level option + + val to_int32 : level -> int32 + + val of_int32 : int32 -> level tzresult +end + (** This module re-exports definitions from {!Tx_rollup_repr} and {!Tx_rollup_storage}. *) module Tx_rollup : sig @@ -2000,6 +2021,8 @@ module Tx_rollup : sig val update_tx_rollups_at_block_finalization : context -> context tzresult Lwt.t + module Set : Set.S with type elt = tx_rollup + module Internal_for_tests : sig (** see [tx_rollup_repr.originated_tx_rollup] for documentation *) val originated_tx_rollup : @@ -2007,6 +2030,12 @@ module Tx_rollup : sig end end +module Tx_rollup_commitment_hash : sig + val commitment_hash : string + + include S.HASH +end + (** This module re-exports definitions from {!Tx_rollup_state_repr} and {!Tx_rollup_state_storage}. *) module Tx_rollup_state : sig @@ -2028,20 +2057,16 @@ module Tx_rollup_state : sig val assert_exist : context -> Tx_rollup.t -> context tzresult Lwt.t - val last_inbox_level : t -> Raw_level.t option - - val first_unfinalized_level : - context -> Tx_rollup.t -> (context * Raw_level.t option) tzresult Lwt.t - - type error += - | Tx_rollup_already_exists of Tx_rollup.t - | Tx_rollup_does_not_exist of Tx_rollup.t - module Internal_for_tests : sig val make : - burn_per_byte:Tez.t -> - inbox_ema:int -> - last_inbox_level:Raw_level.t option -> + ?burn_per_byte:Tez.t -> + ?inbox_ema:int -> + ?last_removed_commitment_hash:Tx_rollup_commitment_hash.t -> + ?commitment_tail_level:Tx_rollup_level.t -> + ?oldest_inbox_level:Tx_rollup_level.t -> + ?commitment_head_level:Tx_rollup_level.t * Tx_rollup_commitment_hash.t -> + ?head_level:Tx_rollup_level.t * Raw_level.t -> + unit -> t val update_burn_per_byte : t -> final_size:int -> hard_limit:int -> t @@ -2138,72 +2163,46 @@ module Tx_rollup_inbox : sig val messages : context -> - level:[`Current | `Level of Raw_level.t] -> + Tx_rollup_level.t -> Tx_rollup.t -> (context * Tx_rollup_message.hash list) tzresult Lwt.t val size : context -> - level:[`Current | `Level of Raw_level.t] -> + Tx_rollup_level.t -> Tx_rollup.t -> (context * int) tzresult Lwt.t val get : - context -> - level:[`Current | `Level of Raw_level.t] -> - Tx_rollup.t -> - (context * t) tzresult Lwt.t + context -> Tx_rollup_level.t -> Tx_rollup.t -> (context * t) tzresult Lwt.t val find : context -> - level:[`Current | `Level of Raw_level.t] -> + Tx_rollup_level.t -> Tx_rollup.t -> (context * t option) tzresult Lwt.t - val get_adjacent_levels : - context -> - Raw_level.t -> - Tx_rollup.t -> - (context * Raw_level.t option * Raw_level.t option) tzresult Lwt.t - module Internal_for_tests : sig - type metadata = { - inbox_length : int32; - cumulated_size : int; - hash : hash; - predecessor : Raw_level_repr.t option; - successor : Raw_level_repr.t option; - } + type metadata = {inbox_length : int32; cumulated_size : int; hash : hash} val get_metadata : context -> - Raw_level.t -> + Tx_rollup_level.t -> Tx_rollup.t -> (context * metadata) tzresult Lwt.t end - - type error += - | Tx_rollup_inbox_does_not_exist of Tx_rollup.t * Raw_level.t - | Tx_rollup_inbox_size_would_exceed_limit of Tx_rollup.t - | Tx_rollup_message_size_exceeds_limit end (** This simply re-exports [Tx_rollup_commitments_repr] *) module Tx_rollup_commitment : sig - module Commitment_hash : sig - val commitment_hash : string - - include S.HASH - end - type batch_commitment = {root : bytes} val batch_commitment_equal : batch_commitment -> batch_commitment -> bool type t = { - level : Raw_level.t; + level : Tx_rollup_level.t; batches : batch_commitment list; - predecessor : Commitment_hash.t option; + predecessor : Tx_rollup_commitment_hash.t option; inbox_hash : Tx_rollup_inbox.hash; } @@ -2212,8 +2211,10 @@ module Tx_rollup_commitment : sig module Submitted_commitment : sig type nonrec t = { commitment : t; + commitment_hash : Tx_rollup_commitment_hash.t; committer : Signature.Public_key_hash.t; submitted_at : Raw_level.t; + finalized_at : Raw_level.t option; } val encoding : t Data_encoding.t @@ -2223,41 +2224,30 @@ module Tx_rollup_commitment : sig val encoding : t Data_encoding.t - val hash : t -> Commitment_hash.t - - type error += Wrong_commitment_predecessor_level - - type error += Missing_commitment_predecessor - - type error += Wrong_batch_count - - type error += Commitment_too_early of Raw_level.t * Raw_level.t - - type error += Level_already_has_commitment of Raw_level.t - - type error += Wrong_inbox_hash - - type error += Retire_uncommitted_level of Raw_level.t - - type error += Bond_does_not_exist of Signature.public_key_hash - - type error += Bond_in_use of Signature.public_key_hash - - type error += Too_many_unfinalized_levels + val hash : t -> Tx_rollup_commitment_hash.t val add_commitment : context -> Tx_rollup.t -> + Tx_rollup_state.t -> Signature.public_key_hash -> t -> - context tzresult Lwt.t + (context * Tx_rollup_state.t) tzresult Lwt.t + + val check_commitment_level : Tx_rollup_state.t -> t -> unit tzresult Lwt.t - val get_commitment : + val find : context -> Tx_rollup.t -> - Raw_level.t -> + Tx_rollup_level.t -> (context * Submitted_commitment.t option) tzresult Lwt.t + val get : + context -> + Tx_rollup.t -> + Tx_rollup_level.t -> + (context * Submitted_commitment.t) tzresult Lwt.t + val pending_bonded_commitments : context -> Tx_rollup.t -> @@ -2270,8 +2260,17 @@ module Tx_rollup_commitment : sig Signature.public_key_hash -> (context * bool) tzresult Lwt.t - val finalize_pending_commitments : - context -> Tx_rollup.t -> Raw_level.t -> context tzresult Lwt.t + val finalize_commitment : + context -> + Tx_rollup.t -> + Tx_rollup_state.t -> + (context * Tx_rollup_state.t * Tx_rollup_level.t) tzresult Lwt.t + + val remove_commitment : + context -> + Tx_rollup.t -> + Tx_rollup_state.t -> + (context * Tx_rollup_state.t * Tx_rollup_level.t) tzresult Lwt.t val remove_bond : context -> @@ -2279,17 +2278,42 @@ module Tx_rollup_commitment : sig Signature.public_key_hash -> context tzresult Lwt.t - module Internal_for_tests : sig - (** See [Tx_rollup_commitments_storage.retire_rollup_level] - for documentation *) - val retire_rollup_level : - context -> - Tx_rollup.t -> - Raw_level.t -> - Raw_level.t -> - (context * [> `No_commitment | `Commitment_too_late | `Retired]) tzresult - Lwt.t - end + val reject_commitment : + context -> + Tx_rollup.t -> + Tx_rollup_state.t -> + Tx_rollup_level.t -> + (context * Tx_rollup_state.t) tzresult Lwt.t +end + +module Tx_rollup_errors : sig + type error += + | Tx_rollup_already_exists of Tx_rollup.t + | Tx_rollup_does_not_exist of Tx_rollup.t + | Submit_batch_burn_excedeed of {burn : Tez.t; limit : Tez.t} + | Inbox_does_not_exist of Tx_rollup.t * Tx_rollup_level.t + | Inbox_size_would_exceed_limit of Tx_rollup.t + | Message_size_exceeds_limit + | Too_many_inboxes + | Wrong_batch_count + | Commitment_too_early of { + provided : Tx_rollup_level.t; + expected : Tx_rollup_level.t; + } + | Level_already_has_commitment of Tx_rollup_level.t + | Wrong_inbox_hash + | Bond_does_not_exist of Signature.public_key_hash + | Bond_in_use of Signature.public_key_hash + | No_commitment_to_finalize + | No_commitment_to_remove + | Commitment_does_not_exist of Tx_rollup_level.t + | Wrong_predecessor_hash of { + provided : Tx_rollup_commitment_hash.t option; + expected : Tx_rollup_commitment_hash.t option; + } + | Invalid_rejection_level_argument + | Invalid_proof + | Internal_error of string end (** This simply re-exports {!Destination_repr}. *) @@ -2367,7 +2391,11 @@ module Kind : sig type tx_rollup_return_bond = Tx_rollup_return_bond_kind - type tx_rollup_finalize = Tx_rollup_finalize_kind + type tx_rollup_finalize_commitment = Tx_rollup_finalize_commitment_kind + + type tx_rollup_remove_commitment = Tx_rollup_remove_commitment_kind + + type tx_rollup_rejection = Tx_rollup_rejection_kind type sc_rollup_originate = Sc_rollup_originate_kind @@ -2384,7 +2412,11 @@ module Kind : sig | Tx_rollup_submit_batch_manager_kind : tx_rollup_submit_batch manager | Tx_rollup_commit_manager_kind : tx_rollup_commit manager | Tx_rollup_return_bond_manager_kind : tx_rollup_return_bond manager - | Tx_rollup_finalize_manager_kind : tx_rollup_finalize manager + | Tx_rollup_finalize_commitment_manager_kind + : tx_rollup_finalize_commitment manager + | Tx_rollup_remove_commitment_manager_kind + : tx_rollup_remove_commitment manager + | Tx_rollup_rejection_manager_kind : tx_rollup_rejection manager | Sc_rollup_originate_manager_kind : sc_rollup_originate manager | Sc_rollup_add_messages_manager_kind : sc_rollup_add_messages manager end @@ -2520,11 +2552,22 @@ and _ manager_operation = tx_rollup : Tx_rollup.t; } -> Kind.tx_rollup_return_bond manager_operation - | Tx_rollup_finalize : { + | Tx_rollup_finalize_commitment : { tx_rollup : Tx_rollup.t; - level : Raw_level.t; } - -> Kind.tx_rollup_finalize manager_operation + -> Kind.tx_rollup_finalize_commitment manager_operation + | Tx_rollup_remove_commitment : { + tx_rollup : Tx_rollup.t; + } + -> Kind.tx_rollup_remove_commitment manager_operation + | Tx_rollup_rejection : { + tx_rollup : Tx_rollup.t; + level : Tx_rollup_level.t; + message : string; + message_position : int; + proof : (* FIXME/TORU *) bool; + } + -> Kind.tx_rollup_rejection manager_operation | Sc_rollup_originate : { kind : Sc_rollup.Kind.t; boot_sector : Sc_rollup.PVM.boot_sector; @@ -2683,7 +2726,13 @@ module Operation : sig val tx_rollup_return_bond_case : Kind.tx_rollup_return_bond Kind.manager case - val tx_rollup_finalize_case : Kind.tx_rollup_finalize Kind.manager case + val tx_rollup_finalize_commitment_case : + Kind.tx_rollup_finalize_commitment Kind.manager case + + val tx_rollup_remove_commitment_case : + Kind.tx_rollup_remove_commitment Kind.manager case + + val tx_rollup_rejection_case : Kind.tx_rollup_rejection Kind.manager case val register_global_constant_case : Kind.register_global_constant Kind.manager case @@ -2727,7 +2776,13 @@ module Operation : sig val tx_rollup_return_bond_case : Kind.tx_rollup_return_bond case - val tx_rollup_finalize_case : Kind.tx_rollup_finalize case + val tx_rollup_finalize_commitment_case : + Kind.tx_rollup_finalize_commitment case + + val tx_rollup_remove_commitment_case : + Kind.tx_rollup_remove_commitment case + + val tx_rollup_rejection_case : Kind.tx_rollup_rejection case val sc_rollup_originate_case : Kind.sc_rollup_originate case diff --git a/src/proto_alpha/lib_protocol/apply.ml b/src/proto_alpha/lib_protocol/apply.ml index 082901a353bd..23bef48eed1f 100644 --- a/src/proto_alpha/lib_protocol/apply.ml +++ b/src/proto_alpha/lib_protocol/apply.ml @@ -1280,10 +1280,11 @@ let apply_manager_operation_content : fail Tx_rollup_operation_with_non_implicit_contract (* This is only called with implicit contracts *) | Some key -> + Tx_rollup_state.get ctxt tx_rollup >>=? fun (ctxt, state) -> ( Tx_rollup_commitment.has_bond ctxt tx_rollup key >>=? fun (ctxt, pending) -> let _ = pending in - (* TODO/TORU: This depends on https://gitlab.com/tezos/tezos/-/merge_requests/4437 + (* TODO/TORU: https://gitlab.com/tezos/tezos/-/merge_requests/4437 let bond_id = Bond_id.Tx_rollup_bond_id tx_rollup in match pending with | 0 -> @@ -1296,8 +1297,14 @@ let apply_manager_operation_content : *) return (ctxt, []) ) >>=? fun (ctxt, balance_updates) -> - Tx_rollup_commitment.add_commitment ctxt tx_rollup key commitment - >>=? fun ctxt -> + Tx_rollup_commitment.add_commitment + ctxt + tx_rollup + state + key + commitment + >>=? fun (ctxt, state) -> + Tx_rollup_state.update ctxt tx_rollup state >>=? fun ctxt -> let result = Tx_rollup_commit_result { @@ -1327,12 +1334,44 @@ let apply_manager_operation_content : } in return (ctxt, result, [])) - | Tx_rollup_finalize {tx_rollup; level} -> - Tx_rollup_commitment.finalize_pending_commitments ctxt tx_rollup level - >>=? fun ctxt -> - (* FIXME *) + | Tx_rollup_finalize_commitment {tx_rollup} -> + Tx_rollup_state.get ctxt tx_rollup >>=? fun (ctxt, state) -> + Tx_rollup_commitment.finalize_commitment ctxt tx_rollup state + >>=? fun (ctxt, state, level) -> + Tx_rollup_state.update ctxt tx_rollup state >>=? fun ctxt -> let result = - Tx_rollup_finalize_result + Tx_rollup_finalize_commitment_result + { + consumed_gas = Gas.consumed ~since:before_operation ~until:ctxt; + balance_updates = []; + level; + } + in + return (ctxt, result, []) + | Tx_rollup_remove_commitment {tx_rollup} -> + Tx_rollup_state.get ctxt tx_rollup >>=? fun (ctxt, state) -> + Tx_rollup_commitment.remove_commitment ctxt tx_rollup state + >>=? fun (ctxt, state, level) -> + Tx_rollup_state.update ctxt tx_rollup state >>=? fun ctxt -> + let result = + Tx_rollup_remove_commitment_result + { + consumed_gas = Gas.consumed ~since:before_operation ~until:ctxt; + balance_updates = []; + level; + } + in + return (ctxt, result, []) + | Tx_rollup_rejection {proof; tx_rollup; level; _} -> + Tx_rollup_state.get ctxt tx_rollup >>=? fun (ctxt, state) -> + (* TODO/TORU: Check the proof *) + fail_unless proof Tx_rollup_errors.Invalid_proof >>=? fun () -> + (* Proof is correct, removing *) + Tx_rollup_commitment.reject_commitment ctxt tx_rollup state level + >>=? fun (ctxt, state) -> + Tx_rollup_state.update ctxt tx_rollup state >>=? fun ctxt -> + let result = + Tx_rollup_rejection_result { consumed_gas = Gas.consumed ~since:before_operation ~until:ctxt; balance_updates = []; @@ -1484,21 +1523,15 @@ let precheck_manager_contents (type kind) ctxt (op : kind Kind.manager contents) Alpha_context.Gas.consume ctxt cost >>?= fun ctxt -> fail_unless Compare.Int.(message_size <= size_limit) - Tx_rollup_inbox.Tx_rollup_message_size_exceeds_limit + Tx_rollup_errors.Message_size_exceeds_limit >|=? fun () -> ctxt - | Tx_rollup_commit {commitment; _} -> + | Tx_rollup_commit {commitment; tx_rollup} -> assert_tx_rollup_feature_enabled ctxt >>=? fun () -> - (* FIXME/TORU: https://gitlab.com/tezos/tezos/-/issues/2469 - - We should think harder about the semantics of commitments - application. *) - let current_level = (Level.current ctxt).level in - fail_when - Raw_level.(current_level <= commitment.level) - (Tx_rollup_commitment.Commitment_too_early - (commitment.level, current_level)) + Tx_rollup_state.get ctxt tx_rollup >>=? fun (ctxt, state) -> + Tx_rollup_commitment.check_commitment_level state commitment >|=? fun () -> ctxt - | Tx_rollup_return_bond _ | Tx_rollup_finalize _ -> + | Tx_rollup_return_bond _ | Tx_rollup_finalize_commitment _ + | Tx_rollup_remove_commitment _ | Tx_rollup_rejection _ -> assert_tx_rollup_feature_enabled ctxt >|=? fun () -> ctxt | Sc_rollup_originate _ | Sc_rollup_add_messages _ -> assert_sc_rollup_feature_enabled ctxt >|=? fun () -> ctxt) @@ -1605,25 +1638,13 @@ let burn_storage_fees : ( ctxt, storage_limit, Tx_rollup_origination_result {payload with balance_updates} ) - | Tx_rollup_submit_batch_result - { - balance_updates = (_ : Receipt.balance_updates); - consumed_gas = (_ : Gas.Arith.fp); - } -> - (* TODO: https://gitlab.com/tezos/tezos/-/issues/2339 + (* TODO/TORU: https://gitlab.com/tezos/tezos/-/issues/2339 We need to charge for newly allocated storage (as we do for Michelson’s big map). *) + | Tx_rollup_submit_batch_result _ | Tx_rollup_commit_result _ + | Tx_rollup_return_bond_result _ | Tx_rollup_finalize_commitment_result _ + | Tx_rollup_remove_commitment_result _ | Tx_rollup_rejection_result _ -> return (ctxt, storage_limit, smopr) - | Tx_rollup_commit_result - { - balance_updates = (_ : Receipt.balance_updates); - consumed_gas = (_ : Gas.Arith.fp); - } -> - return (ctxt, storage_limit, smopr) - | Tx_rollup_return_bond_result payload -> - return (ctxt, storage_limit, Tx_rollup_return_bond_result payload) - | Tx_rollup_finalize_result payload -> - return (ctxt, storage_limit, Tx_rollup_finalize_result payload) | Sc_rollup_originate_result payload -> let payer = `Contract payer in Fees.burn_sc_rollup_origination_fees diff --git a/src/proto_alpha/lib_protocol/apply_results.ml b/src/proto_alpha/lib_protocol/apply_results.ml index 0f1760c099eb..25d4ac2bd2ec 100644 --- a/src/proto_alpha/lib_protocol/apply_results.ml +++ b/src/proto_alpha/lib_protocol/apply_results.ml @@ -116,11 +116,23 @@ type _ successful_manager_operation_result = consumed_gas : Gas.Arith.fp; } -> Kind.tx_rollup_return_bond successful_manager_operation_result - | Tx_rollup_finalize_result : { + | Tx_rollup_finalize_commitment_result : { balance_updates : Receipt.balance_updates; consumed_gas : Gas.Arith.fp; + level : Tx_rollup_level.t; } - -> Kind.tx_rollup_finalize successful_manager_operation_result + -> Kind.tx_rollup_finalize_commitment successful_manager_operation_result + | Tx_rollup_remove_commitment_result : { + balance_updates : Receipt.balance_updates; + consumed_gas : Gas.Arith.fp; + level : Tx_rollup_level.t; + } + -> Kind.tx_rollup_remove_commitment successful_manager_operation_result + | Tx_rollup_rejection_result : { + balance_updates : Receipt.balance_updates; + consumed_gas : Gas.Arith.fp; + } + -> Kind.tx_rollup_rejection successful_manager_operation_result | Sc_rollup_originate_result : { balance_updates : Receipt.balance_updates; address : Sc_rollup.Address.t; @@ -640,9 +652,71 @@ module Manager_result = struct Tx_rollup_return_bond_result {balance_updates; consumed_gas = consumed_milligas}) - let[@coq_axiom_with_reason "gadt"] tx_rollup_finalize_case = + let[@coq_axiom_with_reason "gadt"] tx_rollup_finalize_commitment_case = + make + ~op_case: + Operation.Encoding.Manager_operations.tx_rollup_finalize_commitment_case + ~encoding: + Data_encoding.( + obj4 + (req "balance_updates" Receipt.balance_updates_encoding) + (dft "consumed_gas" Gas.Arith.n_integral_encoding Gas.Arith.zero) + (dft "consumed_milligas" Gas.Arith.n_fp_encoding Gas.Arith.zero) + (req "level" Tx_rollup_level.encoding)) + ~iselect:(function + | Internal_operation_result + (({operation = Tx_rollup_finalize_commitment _; _} as op), res) -> + Some (op, res) + | _ -> None) + ~select:(function + | Successful_manager_result + (Tx_rollup_finalize_commitment_result _ as op) -> + Some op + | _ -> None) + ~kind:Kind.Tx_rollup_finalize_commitment_manager_kind + ~proj:(function + | Tx_rollup_finalize_commitment_result + {balance_updates; consumed_gas; level} -> + (balance_updates, Gas.Arith.ceil consumed_gas, consumed_gas, level)) + ~inj:(fun (balance_updates, consumed_gas, consumed_milligas, level) -> + assert (Gas.Arith.(equal (ceil consumed_milligas) consumed_gas)) ; + Tx_rollup_finalize_commitment_result + {balance_updates; consumed_gas = consumed_milligas; level}) + + let[@coq_axiom_with_reason "gadt"] tx_rollup_remove_commitment_case = + make + ~op_case: + Operation.Encoding.Manager_operations.tx_rollup_remove_commitment_case + ~encoding: + Data_encoding.( + obj4 + (req "balance_updates" Receipt.balance_updates_encoding) + (dft "consumed_gas" Gas.Arith.n_integral_encoding Gas.Arith.zero) + (dft "consumed_milligas" Gas.Arith.n_fp_encoding Gas.Arith.zero) + (req "level" Tx_rollup_level.encoding)) + ~iselect:(function + | Internal_operation_result + (({operation = Tx_rollup_remove_commitment _; _} as op), res) -> + Some (op, res) + | _ -> None) + ~select:(function + | Successful_manager_result (Tx_rollup_remove_commitment_result _ as op) + -> + Some op + | _ -> None) + ~kind:Kind.Tx_rollup_remove_commitment_manager_kind + ~proj:(function + | Tx_rollup_remove_commitment_result + {balance_updates; consumed_gas; level} -> + (balance_updates, Gas.Arith.ceil consumed_gas, consumed_gas, level)) + ~inj:(fun (balance_updates, consumed_gas, consumed_milligas, level) -> + assert (Gas.Arith.(equal (ceil consumed_milligas) consumed_gas)) ; + Tx_rollup_remove_commitment_result + {balance_updates; consumed_gas = consumed_milligas; level}) + + let[@coq_axiom_with_reason "gadt"] tx_rollup_rejection_case = make - ~op_case:Operation.Encoding.Manager_operations.tx_rollup_finalize_case + ~op_case:Operation.Encoding.Manager_operations.tx_rollup_rejection_case ~encoding: Data_encoding.( obj3 @@ -651,20 +725,20 @@ module Manager_result = struct (dft "consumed_milligas" Gas.Arith.n_fp_encoding Gas.Arith.zero)) ~iselect:(function | Internal_operation_result - (({operation = Tx_rollup_finalize _; _} as op), res) -> + (({operation = Tx_rollup_rejection _; _} as op), res) -> Some (op, res) | _ -> None) ~select:(function - | Successful_manager_result (Tx_rollup_finalize_result _ as op) -> + | Successful_manager_result (Tx_rollup_rejection_result _ as op) -> Some op | _ -> None) - ~kind:Kind.Tx_rollup_finalize_manager_kind + ~kind:Kind.Tx_rollup_rejection_manager_kind ~proj:(function - | Tx_rollup_finalize_result {balance_updates; consumed_gas} -> + | Tx_rollup_rejection_result {balance_updates; consumed_gas} -> (balance_updates, Gas.Arith.ceil consumed_gas, consumed_gas)) ~inj:(fun (balance_updates, consumed_gas, consumed_milligas) -> assert (Gas.Arith.(equal (ceil consumed_milligas) consumed_gas)) ; - Tx_rollup_finalize_result + Tx_rollup_rejection_result {balance_updates; consumed_gas = consumed_milligas}) let[@coq_axiom_with_reason "gadt"] sc_rollup_originate_case = @@ -878,10 +952,18 @@ let equal_manager_kind : Kind.Tx_rollup_return_bond_manager_kind ) -> Some Eq | (Kind.Tx_rollup_return_bond_manager_kind, _) -> None - | (Kind.Tx_rollup_finalize_manager_kind, Kind.Tx_rollup_finalize_manager_kind) - -> + | ( Kind.Tx_rollup_finalize_commitment_manager_kind, + Kind.Tx_rollup_finalize_commitment_manager_kind ) -> + Some Eq + | (Kind.Tx_rollup_finalize_commitment_manager_kind, _) -> None + | ( Kind.Tx_rollup_remove_commitment_manager_kind, + Kind.Tx_rollup_remove_commitment_manager_kind ) -> + Some Eq + | (Kind.Tx_rollup_remove_commitment_manager_kind, _) -> None + | ( Kind.Tx_rollup_rejection_manager_kind, + Kind.Tx_rollup_rejection_manager_kind ) -> Some Eq - | (Kind.Tx_rollup_finalize_manager_kind, _) -> None + | (Kind.Tx_rollup_rejection_manager_kind, _) -> None | ( Kind.Sc_rollup_originate_manager_kind, Kind.Sc_rollup_originate_manager_kind ) -> Some Eq @@ -1285,13 +1367,37 @@ module Encoding = struct Some (op, res) | _ -> None) - let[@coq_axiom_with_reason "gadt"] tx_rollup_finalize_case = + let[@coq_axiom_with_reason "gadt"] tx_rollup_finalize_commitment_case = + make_manager_case + Operation.Encoding.tx_rollup_finalize_commitment_case + Manager_result.tx_rollup_finalize_commitment_case + (function + | Contents_and_result + ( (Manager_operation {operation = Tx_rollup_finalize_commitment _; _} + as op), + res ) -> + Some (op, res) + | _ -> None) + + let[@coq_axiom_with_reason "gadt"] tx_rollup_remove_commitment_case = make_manager_case - Operation.Encoding.tx_rollup_finalize_case - Manager_result.tx_rollup_finalize_case + Operation.Encoding.tx_rollup_remove_commitment_case + Manager_result.tx_rollup_remove_commitment_case (function | Contents_and_result - ( (Manager_operation {operation = Tx_rollup_finalize _; _} as op), + ( (Manager_operation {operation = Tx_rollup_remove_commitment _; _} + as op), + res ) -> + Some (op, res) + | _ -> None) + + let[@coq_axiom_with_reason "gadt"] tx_rollup_rejection_case = + make_manager_case + Operation.Encoding.tx_rollup_rejection_case + Manager_result.tx_rollup_rejection_case + (function + | Contents_and_result + ( (Manager_operation {operation = Tx_rollup_rejection _; _} as op), res ) -> Some (op, res) | _ -> None) @@ -1357,7 +1463,9 @@ let contents_result_encoding = make tx_rollup_submit_batch_case; make tx_rollup_commit_case; make tx_rollup_return_bond_case; - make tx_rollup_finalize_case; + make tx_rollup_finalize_commitment_case; + make tx_rollup_remove_commitment_case; + make tx_rollup_rejection_case; make sc_rollup_originate_case; make sc_rollup_add_messages_case; ] @@ -1405,7 +1513,9 @@ let contents_and_result_encoding = make tx_rollup_submit_batch_case; make tx_rollup_commit_case; make tx_rollup_return_bond_case; - make tx_rollup_finalize_case; + make tx_rollup_finalize_commitment_case; + make tx_rollup_remove_commitment_case; + make tx_rollup_rejection_case; make sc_rollup_originate_case; make sc_rollup_add_messages_case; ] @@ -1788,32 +1898,97 @@ let kind_equal : } ) -> Some Eq | (Manager_operation {operation = Tx_rollup_return_bond _; _}, _) -> None - | ( Manager_operation {operation = Tx_rollup_finalize _; _}, + | ( Manager_operation {operation = Tx_rollup_finalize_commitment _; _}, + Manager_operation_result + {operation_result = Applied (Tx_rollup_finalize_commitment_result _); _} + ) -> + Some Eq + | ( Manager_operation {operation = Tx_rollup_finalize_commitment _; _}, + Manager_operation_result + { + operation_result = + Backtracked (Tx_rollup_finalize_commitment_result _, _); + _; + } ) -> + Some Eq + | ( Manager_operation {operation = Tx_rollup_finalize_commitment _; _}, + Manager_operation_result + { + operation_result = + Failed + (Alpha_context.Kind.Tx_rollup_finalize_commitment_manager_kind, _); + _; + } ) -> + Some Eq + | ( Manager_operation {operation = Tx_rollup_finalize_commitment _; _}, + Manager_operation_result + { + operation_result = + Skipped + Alpha_context.Kind.Tx_rollup_finalize_commitment_manager_kind; + _; + } ) -> + Some Eq + | (Manager_operation {operation = Tx_rollup_finalize_commitment _; _}, _) -> + None + | ( Manager_operation {operation = Tx_rollup_remove_commitment _; _}, + Manager_operation_result + {operation_result = Applied (Tx_rollup_remove_commitment_result _); _} + ) -> + Some Eq + | ( Manager_operation {operation = Tx_rollup_remove_commitment _; _}, + Manager_operation_result + { + operation_result = + Backtracked (Tx_rollup_remove_commitment_result _, _); + _; + } ) -> + Some Eq + | ( Manager_operation {operation = Tx_rollup_remove_commitment _; _}, + Manager_operation_result + { + operation_result = + Failed + (Alpha_context.Kind.Tx_rollup_remove_commitment_manager_kind, _); + _; + } ) -> + Some Eq + | ( Manager_operation {operation = Tx_rollup_remove_commitment _; _}, + Manager_operation_result + { + operation_result = + Skipped Alpha_context.Kind.Tx_rollup_remove_commitment_manager_kind; + _; + } ) -> + Some Eq + | (Manager_operation {operation = Tx_rollup_remove_commitment _; _}, _) -> + None + | ( Manager_operation {operation = Tx_rollup_rejection _; _}, Manager_operation_result - {operation_result = Applied (Tx_rollup_finalize_result _); _} ) -> + {operation_result = Applied (Tx_rollup_rejection_result _); _} ) -> Some Eq - | ( Manager_operation {operation = Tx_rollup_finalize _; _}, + | ( Manager_operation {operation = Tx_rollup_rejection _; _}, Manager_operation_result - {operation_result = Backtracked (Tx_rollup_finalize_result _, _); _} ) + {operation_result = Backtracked (Tx_rollup_rejection_result _, _); _} ) -> Some Eq - | ( Manager_operation {operation = Tx_rollup_finalize _; _}, + | ( Manager_operation {operation = Tx_rollup_rejection _; _}, Manager_operation_result { operation_result = - Failed (Alpha_context.Kind.Tx_rollup_finalize_manager_kind, _); + Failed (Alpha_context.Kind.Tx_rollup_rejection_manager_kind, _); _; } ) -> Some Eq - | ( Manager_operation {operation = Tx_rollup_finalize _; _}, + | ( Manager_operation {operation = Tx_rollup_rejection _; _}, Manager_operation_result { operation_result = - Skipped Alpha_context.Kind.Tx_rollup_finalize_manager_kind; + Skipped Alpha_context.Kind.Tx_rollup_rejection_manager_kind; _; } ) -> Some Eq - | (Manager_operation {operation = Tx_rollup_finalize _; _}, _) -> None + | (Manager_operation {operation = Tx_rollup_rejection _; _}, _) -> None | ( Manager_operation {operation = Sc_rollup_originate _; _}, Manager_operation_result {operation_result = Applied (Sc_rollup_originate_result _); _} ) -> diff --git a/src/proto_alpha/lib_protocol/apply_results.mli b/src/proto_alpha/lib_protocol/apply_results.mli index 81dc69d40baa..5b43155afec4 100644 --- a/src/proto_alpha/lib_protocol/apply_results.mli +++ b/src/proto_alpha/lib_protocol/apply_results.mli @@ -193,11 +193,23 @@ and _ successful_manager_operation_result = consumed_gas : Gas.Arith.fp; } -> Kind.tx_rollup_return_bond successful_manager_operation_result - | Tx_rollup_finalize_result : { + | Tx_rollup_finalize_commitment_result : { balance_updates : Receipt.balance_updates; consumed_gas : Gas.Arith.fp; + level : Tx_rollup_level.t; } - -> Kind.tx_rollup_finalize successful_manager_operation_result + -> Kind.tx_rollup_finalize_commitment successful_manager_operation_result + | Tx_rollup_remove_commitment_result : { + balance_updates : Receipt.balance_updates; + consumed_gas : Gas.Arith.fp; + level : Tx_rollup_level.t; + } + -> Kind.tx_rollup_remove_commitment successful_manager_operation_result + | Tx_rollup_rejection_result : { + balance_updates : Receipt.balance_updates; + consumed_gas : Gas.Arith.fp; + } + -> Kind.tx_rollup_rejection successful_manager_operation_result | Sc_rollup_originate_result : { balance_updates : Receipt.balance_updates; address : Sc_rollup.Address.t; diff --git a/src/proto_alpha/lib_protocol/constants_repr.ml b/src/proto_alpha/lib_protocol/constants_repr.ml index 856cdac63d23..d7b925f82518 100644 --- a/src/proto_alpha/lib_protocol/constants_repr.ml +++ b/src/proto_alpha/lib_protocol/constants_repr.ml @@ -165,6 +165,7 @@ type parametric = { tx_rollup_hard_size_limit_per_message : int; tx_rollup_commitment_bond : Tez_repr.t; tx_rollup_finality_period : int; + tx_rollup_withdraw_period : int; tx_rollup_max_unfinalized_levels : int; sc_rollup_enable : bool; sc_rollup_origination_size : int; @@ -216,6 +217,7 @@ let parametric_encoding = c.tx_rollup_hard_size_limit_per_message, c.tx_rollup_commitment_bond, c.tx_rollup_finality_period, + c.tx_rollup_withdraw_period, c.tx_rollup_max_unfinalized_levels ), (c.sc_rollup_enable, c.sc_rollup_origination_size) ) ) ) ) ) )) @@ -261,6 +263,7 @@ let parametric_encoding = tx_rollup_hard_size_limit_per_message, tx_rollup_commitment_bond, tx_rollup_finality_period, + tx_rollup_withdraw_period, tx_rollup_max_unfinalized_levels ), (sc_rollup_enable, sc_rollup_origination_size) ) ) ) ) ) ) -> { @@ -306,6 +309,7 @@ let parametric_encoding = tx_rollup_hard_size_limit_per_message; tx_rollup_commitment_bond; tx_rollup_finality_period; + tx_rollup_withdraw_period; tx_rollup_max_unfinalized_levels; sc_rollup_enable; sc_rollup_origination_size; @@ -363,13 +367,14 @@ let parametric_encoding = (req "cache_stake_distribution_cycles" int8) (req "cache_sampler_state_cycles" int8)) (merge_objs - (obj7 + (obj8 (req "tx_rollup_enable" bool) (req "tx_rollup_origination_size" int31) (req "tx_rollup_hard_size_limit_per_inbox" int31) (req "tx_rollup_hard_size_limit_per_message" int31) (req "tx_rollup_commitment_bond" Tez_repr.encoding) (req "tx_rollup_finality_period" int31) + (req "tx_rollup_withdraw_period" int31) (req "tx_rollup_max_unfinalized_levels" int31)) (obj2 (req "sc_rollup_enable" bool) diff --git a/src/proto_alpha/lib_protocol/constants_repr.mli b/src/proto_alpha/lib_protocol/constants_repr.mli index 998aa5863341..e9f151f09a99 100644 --- a/src/proto_alpha/lib_protocol/constants_repr.mli +++ b/src/proto_alpha/lib_protocol/constants_repr.mli @@ -134,6 +134,9 @@ type parametric = { tx_rollup_finality_period : int; (* the maximum number of levels that can be left unfinalized before we stop accepting new inboxes for a tx rollup *) + (* the minimum number of blocks to wait before removing a finalised + commitment from the context. *) + tx_rollup_withdraw_period : int; tx_rollup_max_unfinalized_levels : int; sc_rollup_enable : bool; sc_rollup_origination_size : int; diff --git a/src/proto_alpha/lib_protocol/constants_storage.ml b/src/proto_alpha/lib_protocol/constants_storage.ml index bd73d5c020bd..163e7a2d564a 100644 --- a/src/proto_alpha/lib_protocol/constants_storage.ml +++ b/src/proto_alpha/lib_protocol/constants_storage.ml @@ -170,6 +170,10 @@ let tx_rollup_finality_period c = let constants = Raw_context.constants c in constants.tx_rollup_finality_period +let tx_rollup_withdraw_period c = + let constants = Raw_context.constants c in + constants.tx_rollup_withdraw_period + let tx_rollup_max_unfinalized_levels c = let constants = Raw_context.constants c in constants.tx_rollup_max_unfinalized_levels diff --git a/src/proto_alpha/lib_protocol/constants_storage.mli b/src/proto_alpha/lib_protocol/constants_storage.mli index b6683b0e5814..24e3730a515a 100644 --- a/src/proto_alpha/lib_protocol/constants_storage.mli +++ b/src/proto_alpha/lib_protocol/constants_storage.mli @@ -96,6 +96,8 @@ val tx_rollup_commitment_bond : Raw_context.t -> Tez_repr.t val tx_rollup_finality_period : Raw_context.t -> int +val tx_rollup_withdraw_period : Raw_context.t -> int + val tx_rollup_max_unfinalized_levels : Raw_context.t -> int val ratio_of_frozen_deposits_slashed_per_double_endorsement : diff --git a/src/proto_alpha/lib_protocol/dune.inc b/src/proto_alpha/lib_protocol/dune.inc index f72940e10476..76181dd497d2 100644 --- a/src/proto_alpha/lib_protocol/dune.inc +++ b/src/proto_alpha/lib_protocol/dune.inc @@ -69,13 +69,15 @@ module CamlinternalFormatBasics = struct include CamlinternalFormatBasics end contract_repr.mli contract_repr.ml indexable.mli indexable.ml entrypoint_repr.mli entrypoint_repr.ml + tx_rollup_level_repr.mli tx_rollup_level_repr.ml tx_rollup_l2_address.mli tx_rollup_l2_address.ml tx_rollup_l2_qty.mli tx_rollup_l2_qty.ml tx_rollup_repr.mli tx_rollup_repr.ml - tx_rollup_state_repr.mli tx_rollup_state_repr.ml tx_rollup_message_repr.mli tx_rollup_message_repr.ml tx_rollup_inbox_repr.mli tx_rollup_inbox_repr.ml tx_rollup_commitment_repr.mli tx_rollup_commitment_repr.ml + tx_rollup_errors_repr.ml + tx_rollup_state_repr.mli tx_rollup_state_repr.ml vote_repr.mli vote_repr.ml block_header_repr.mli block_header_repr.ml destination_repr.mli destination_repr.ml @@ -231,13 +233,15 @@ module CamlinternalFormatBasics = struct include CamlinternalFormatBasics end contract_repr.mli contract_repr.ml indexable.mli indexable.ml entrypoint_repr.mli entrypoint_repr.ml + tx_rollup_level_repr.mli tx_rollup_level_repr.ml tx_rollup_l2_address.mli tx_rollup_l2_address.ml tx_rollup_l2_qty.mli tx_rollup_l2_qty.ml tx_rollup_repr.mli tx_rollup_repr.ml - tx_rollup_state_repr.mli tx_rollup_state_repr.ml tx_rollup_message_repr.mli tx_rollup_message_repr.ml tx_rollup_inbox_repr.mli tx_rollup_inbox_repr.ml tx_rollup_commitment_repr.mli tx_rollup_commitment_repr.ml + tx_rollup_errors_repr.ml + tx_rollup_state_repr.mli tx_rollup_state_repr.ml vote_repr.mli vote_repr.ml block_header_repr.mli block_header_repr.ml destination_repr.mli destination_repr.ml @@ -393,13 +397,15 @@ module CamlinternalFormatBasics = struct include CamlinternalFormatBasics end contract_repr.mli contract_repr.ml indexable.mli indexable.ml entrypoint_repr.mli entrypoint_repr.ml + tx_rollup_level_repr.mli tx_rollup_level_repr.ml tx_rollup_l2_address.mli tx_rollup_l2_address.ml tx_rollup_l2_qty.mli tx_rollup_l2_qty.ml tx_rollup_repr.mli tx_rollup_repr.ml - tx_rollup_state_repr.mli tx_rollup_state_repr.ml tx_rollup_message_repr.mli tx_rollup_message_repr.ml tx_rollup_inbox_repr.mli tx_rollup_inbox_repr.ml tx_rollup_commitment_repr.mli tx_rollup_commitment_repr.ml + tx_rollup_errors_repr.ml + tx_rollup_state_repr.mli tx_rollup_state_repr.ml vote_repr.mli vote_repr.ml block_header_repr.mli block_header_repr.ml destination_repr.mli destination_repr.ml @@ -577,13 +583,15 @@ include Tezos_raw_protocol_alpha.Main Contract_repr Indexable Entrypoint_repr + Tx_rollup_level_repr Tx_rollup_l2_address Tx_rollup_l2_qty Tx_rollup_repr - Tx_rollup_state_repr Tx_rollup_message_repr Tx_rollup_inbox_repr Tx_rollup_commitment_repr + Tx_rollup_errors_repr + Tx_rollup_state_repr Vote_repr Block_header_repr Destination_repr @@ -780,13 +788,15 @@ include Tezos_raw_protocol_alpha.Main contract_repr.mli contract_repr.ml indexable.mli indexable.ml entrypoint_repr.mli entrypoint_repr.ml + tx_rollup_level_repr.mli tx_rollup_level_repr.ml tx_rollup_l2_address.mli tx_rollup_l2_address.ml tx_rollup_l2_qty.mli tx_rollup_l2_qty.ml tx_rollup_repr.mli tx_rollup_repr.ml - tx_rollup_state_repr.mli tx_rollup_state_repr.ml tx_rollup_message_repr.mli tx_rollup_message_repr.ml tx_rollup_inbox_repr.mli tx_rollup_inbox_repr.ml tx_rollup_commitment_repr.mli tx_rollup_commitment_repr.ml + tx_rollup_errors_repr.ml + tx_rollup_state_repr.mli tx_rollup_state_repr.ml vote_repr.mli vote_repr.ml block_header_repr.mli block_header_repr.ml destination_repr.mli destination_repr.ml diff --git a/src/proto_alpha/lib_protocol/operation_repr.ml b/src/proto_alpha/lib_protocol/operation_repr.ml index 5cdfa3a1e1d8..a55200c08243 100644 --- a/src/proto_alpha/lib_protocol/operation_repr.ml +++ b/src/proto_alpha/lib_protocol/operation_repr.ml @@ -79,7 +79,11 @@ module Kind = struct type tx_rollup_return_bond = Tx_rollup_return_bond_kind - type tx_rollup_finalize = Tx_rollup_finalize_kind + type tx_rollup_finalize_commitment = Tx_rollup_finalize_commitment_kind + + type tx_rollup_remove_commitment = Tx_rollup_remove_commitment_kind + + type tx_rollup_rejection = Tx_rollup_rejection_kind type sc_rollup_originate = Sc_rollup_originate_kind @@ -96,7 +100,11 @@ module Kind = struct | Tx_rollup_submit_batch_manager_kind : tx_rollup_submit_batch manager | Tx_rollup_commit_manager_kind : tx_rollup_commit manager | Tx_rollup_return_bond_manager_kind : tx_rollup_return_bond manager - | Tx_rollup_finalize_manager_kind : tx_rollup_finalize manager + | Tx_rollup_finalize_commitment_manager_kind + : tx_rollup_finalize_commitment manager + | Tx_rollup_remove_commitment_manager_kind + : tx_rollup_remove_commitment manager + | Tx_rollup_rejection_manager_kind : tx_rollup_rejection manager | Sc_rollup_originate_manager_kind : sc_rollup_originate manager | Sc_rollup_add_messages_manager_kind : sc_rollup_add_messages manager end @@ -292,11 +300,22 @@ and _ manager_operation = tx_rollup : Tx_rollup_repr.t; } -> Kind.tx_rollup_return_bond manager_operation - | Tx_rollup_finalize : { + | Tx_rollup_finalize_commitment : { + tx_rollup : Tx_rollup_repr.t; + } + -> Kind.tx_rollup_finalize_commitment manager_operation + | Tx_rollup_remove_commitment : { tx_rollup : Tx_rollup_repr.t; - level : Raw_level_repr.t; } - -> Kind.tx_rollup_finalize manager_operation + -> Kind.tx_rollup_remove_commitment manager_operation + | Tx_rollup_rejection : { + tx_rollup : Tx_rollup_repr.t; + level : Tx_rollup_level_repr.t; + message : string; + message_position : int; + proof : (* FIXME/TORU *) bool; + } + -> Kind.tx_rollup_rejection manager_operation | Sc_rollup_originate : { kind : Sc_rollup_repr.Kind.t; boot_sector : Sc_rollup_repr.PVM.boot_sector; @@ -322,7 +341,11 @@ let manager_kind : type kind. kind manager_operation -> kind Kind.manager = | Tx_rollup_submit_batch _ -> Kind.Tx_rollup_submit_batch_manager_kind | Tx_rollup_commit _ -> Kind.Tx_rollup_commit_manager_kind | Tx_rollup_return_bond _ -> Kind.Tx_rollup_return_bond_manager_kind - | Tx_rollup_finalize _ -> Kind.Tx_rollup_finalize_manager_kind + | Tx_rollup_finalize_commitment _ -> + Kind.Tx_rollup_finalize_commitment_manager_kind + | Tx_rollup_remove_commitment _ -> + Kind.Tx_rollup_remove_commitment_manager_kind + | Tx_rollup_rejection _ -> Kind.Tx_rollup_rejection_manager_kind | Sc_rollup_originate _ -> Kind.Sc_rollup_originate_manager_kind | Sc_rollup_add_messages _ -> Kind.Sc_rollup_add_messages_manager_kind @@ -394,7 +417,13 @@ let tx_rollup_operation_commit_tag = tx_rollup_operation_tag_offset + 2 let tx_rollup_operation_return_bond_tag = tx_rollup_operation_tag_offset + 3 -let tx_rollup_operation_finalize_tag = tx_rollup_operation_tag_offset + 4 +let tx_rollup_operation_finalize_commitment_tag = + tx_rollup_operation_tag_offset + 4 + +let tx_rollup_operation_remove_commitment_tag = + tx_rollup_operation_tag_offset + 5 + +let tx_rollup_operation_rejection_tag = tx_rollup_operation_tag_offset + 6 let sc_rollup_operation_tag_offset = 200 @@ -611,23 +640,60 @@ module Encoding = struct inj = (fun tx_rollup -> Tx_rollup_return_bond {tx_rollup}); } - let[@coq_axiom_with_reason "gadt"] tx_rollup_finalize_case = + let[@coq_axiom_with_reason "gadt"] tx_rollup_finalize_commitment_case = + MCase + { + tag = tx_rollup_operation_finalize_commitment_tag; + name = "tx_rollup_finalize_commitment"; + encoding = obj1 (req "rollup" Tx_rollup_repr.encoding); + select = + (function + | Manager (Tx_rollup_finalize_commitment _ as op) -> Some op + | _ -> None); + proj = + (function Tx_rollup_finalize_commitment {tx_rollup} -> tx_rollup); + inj = (fun tx_rollup -> Tx_rollup_finalize_commitment {tx_rollup}); + } + + let[@coq_axiom_with_reason "gadt"] tx_rollup_remove_commitment_case = MCase { - tag = tx_rollup_operation_finalize_tag; - name = "tx_rollup_finalize"; + tag = tx_rollup_operation_remove_commitment_tag; + name = "tx_rollup_remove_commitment"; + encoding = obj1 (req "rollup" Tx_rollup_repr.encoding); + select = + (function + | Manager (Tx_rollup_remove_commitment _ as op) -> Some op + | _ -> None); + proj = + (function Tx_rollup_remove_commitment {tx_rollup} -> tx_rollup); + inj = (fun tx_rollup -> Tx_rollup_remove_commitment {tx_rollup}); + } + + let[@coq_axiom_with_reason "gadt"] tx_rollup_rejection_case = + MCase + { + tag = tx_rollup_operation_rejection_tag; + name = "tx_rollup_rejection"; encoding = - obj2 + obj5 (req "rollup" Tx_rollup_repr.encoding) - (req "level" Raw_level_repr.encoding); + (req "level" Tx_rollup_level_repr.encoding) + (req "message" string) + (req "message_position" int31) + (req "proof" bool); select = (function - | Manager (Tx_rollup_finalize _ as op) -> Some op | _ -> None); + | Manager (Tx_rollup_rejection _ as op) -> Some op | _ -> None); proj = (function - | Tx_rollup_finalize {tx_rollup; level} -> (tx_rollup, level)); + | Tx_rollup_rejection + {tx_rollup; level; message; message_position; proof} -> + (tx_rollup, level, message, message_position, proof)); inj = - (fun (tx_rollup, level) -> Tx_rollup_finalize {tx_rollup; level}); + (fun (tx_rollup, level, message, message_position, proof) -> + Tx_rollup_rejection + {tx_rollup; level; message; message_position; proof}); } let[@coq_axiom_with_reason "gadt"] sc_rollup_originate_case = @@ -692,7 +758,9 @@ module Encoding = struct make tx_rollup_submit_batch_case; make tx_rollup_commit_case; make tx_rollup_return_bond_case; - make tx_rollup_finalize_case; + make tx_rollup_finalize_commitment_case; + make tx_rollup_remove_commitment_case; + make tx_rollup_rejection_case; make sc_rollup_originate_case; make sc_rollup_add_messages_case; ] @@ -1011,10 +1079,20 @@ module Encoding = struct tx_rollup_operation_return_bond_tag Manager_operations.tx_rollup_return_bond_case - let tx_rollup_finalize_case = + let tx_rollup_finalize_commitment_case = + make_manager_case + tx_rollup_operation_finalize_commitment_tag + Manager_operations.tx_rollup_finalize_commitment_case + + let tx_rollup_remove_commitment_case = + make_manager_case + tx_rollup_operation_remove_commitment_tag + Manager_operations.tx_rollup_remove_commitment_case + + let tx_rollup_rejection_case = make_manager_case - tx_rollup_operation_finalize_tag - Manager_operations.tx_rollup_finalize_case + tx_rollup_operation_rejection_tag + Manager_operations.tx_rollup_rejection_case let sc_rollup_originate_case = make_manager_case @@ -1058,7 +1136,9 @@ module Encoding = struct make tx_rollup_submit_batch_case; make tx_rollup_commit_case; make tx_rollup_return_bond_case; - make tx_rollup_finalize_case; + make tx_rollup_finalize_commitment_case; + make tx_rollup_remove_commitment_case; + make tx_rollup_rejection_case; make sc_rollup_originate_case; make sc_rollup_add_messages_case; ] @@ -1268,8 +1348,13 @@ let equal_manager_operation_kind : | (Tx_rollup_commit _, _) -> None | (Tx_rollup_return_bond _, Tx_rollup_return_bond _) -> Some Eq | (Tx_rollup_return_bond _, _) -> None - | (Tx_rollup_finalize _, Tx_rollup_finalize _) -> Some Eq - | (Tx_rollup_finalize _, _) -> None + | (Tx_rollup_finalize_commitment _, Tx_rollup_finalize_commitment _) -> + Some Eq + | (Tx_rollup_finalize_commitment _, _) -> None + | (Tx_rollup_remove_commitment _, Tx_rollup_remove_commitment _) -> Some Eq + | (Tx_rollup_remove_commitment _, _) -> None + | (Tx_rollup_rejection _, Tx_rollup_rejection _) -> Some Eq + | (Tx_rollup_rejection _, _) -> None | (Sc_rollup_originate _, Sc_rollup_originate _) -> Some Eq | (Sc_rollup_originate _, _) -> None | (Sc_rollup_add_messages _, Sc_rollup_add_messages _) -> Some Eq @@ -1388,8 +1473,14 @@ let internal_manager_operation_size (type a) (op : a manager_operation) = | Tx_rollup_return_bond _ -> (* Tx_rollup_return_bond operation can’t occur as internal operations *) assert false - | Tx_rollup_finalize _ -> - (* Tx_rollup_finalize operation can’t occur as internal operations *) + | Tx_rollup_finalize_commitment _ -> + (* Tx_rollup_finalize_commitment operation can’t occur as internal operations *) + assert false + | Tx_rollup_remove_commitment _ -> + (* Tx_rollup_remove_commitment operation can’t occur as internal operations *) + assert false + | Tx_rollup_rejection _ -> + (* Tx_rollup_rejection_commitment operation can’t occur as internal operations *) assert false let packed_internal_operation_in_memory_size : diff --git a/src/proto_alpha/lib_protocol/operation_repr.mli b/src/proto_alpha/lib_protocol/operation_repr.mli index 66865ca89931..2e9da68d6be1 100644 --- a/src/proto_alpha/lib_protocol/operation_repr.mli +++ b/src/proto_alpha/lib_protocol/operation_repr.mli @@ -105,7 +105,11 @@ module Kind : sig type tx_rollup_return_bond = Tx_rollup_return_bond_kind - type tx_rollup_finalize = Tx_rollup_finalize_kind + type tx_rollup_finalize_commitment = Tx_rollup_finalize_commitment_kind + + type tx_rollup_remove_commitment = Tx_rollup_remove_commitment_kind + + type tx_rollup_rejection = Tx_rollup_rejection_kind type sc_rollup_originate = Sc_rollup_originate_kind @@ -122,7 +126,11 @@ module Kind : sig | Tx_rollup_submit_batch_manager_kind : tx_rollup_submit_batch manager | Tx_rollup_commit_manager_kind : tx_rollup_commit manager | Tx_rollup_return_bond_manager_kind : tx_rollup_return_bond manager - | Tx_rollup_finalize_manager_kind : tx_rollup_finalize manager + | Tx_rollup_finalize_commitment_manager_kind + : tx_rollup_finalize_commitment manager + | Tx_rollup_remove_commitment_manager_kind + : tx_rollup_remove_commitment manager + | Tx_rollup_rejection_manager_kind : tx_rollup_rejection manager | Sc_rollup_originate_manager_kind : sc_rollup_originate manager | Sc_rollup_add_messages_manager_kind : sc_rollup_add_messages manager end @@ -332,11 +340,22 @@ and _ manager_operation = tx_rollup : Tx_rollup_repr.t; } -> Kind.tx_rollup_return_bond manager_operation - | Tx_rollup_finalize : { + | Tx_rollup_finalize_commitment : { tx_rollup : Tx_rollup_repr.t; - level : Raw_level_repr.t; } - -> Kind.tx_rollup_finalize manager_operation + -> Kind.tx_rollup_finalize_commitment manager_operation + | Tx_rollup_remove_commitment : { + tx_rollup : Tx_rollup_repr.t; + } + -> Kind.tx_rollup_remove_commitment manager_operation + | Tx_rollup_rejection : { + tx_rollup : Tx_rollup_repr.t; + level : Tx_rollup_level_repr.t; + message : string; + message_position : int; + proof : (* FIXME/TORU *) bool; + } + -> Kind.tx_rollup_rejection manager_operation (* [Sc_rollup_originate] allows an implicit account to originate a new smart contract rollup (initialized with a given boot sector). *) @@ -485,7 +504,13 @@ module Encoding : sig val tx_rollup_return_bond_case : Kind.tx_rollup_return_bond Kind.manager case - val tx_rollup_finalize_case : Kind.tx_rollup_finalize Kind.manager case + val tx_rollup_finalize_commitment_case : + Kind.tx_rollup_finalize_commitment Kind.manager case + + val tx_rollup_remove_commitment_case : + Kind.tx_rollup_remove_commitment Kind.manager case + + val tx_rollup_rejection_case : Kind.tx_rollup_rejection Kind.manager case val sc_rollup_originate_case : Kind.sc_rollup_originate Kind.manager case @@ -524,7 +549,12 @@ module Encoding : sig val tx_rollup_return_bond_case : Kind.tx_rollup_return_bond case - val tx_rollup_finalize_case : Kind.tx_rollup_finalize case + val tx_rollup_finalize_commitment_case : + Kind.tx_rollup_finalize_commitment case + + val tx_rollup_remove_commitment_case : Kind.tx_rollup_remove_commitment case + + val tx_rollup_rejection_case : Kind.tx_rollup_rejection case val sc_rollup_originate_case : Kind.sc_rollup_originate case diff --git a/src/proto_alpha/lib_protocol/raw_context.ml b/src/proto_alpha/lib_protocol/raw_context.ml index a114fc9859af..f31ebcaa6eed 100644 --- a/src/proto_alpha/lib_protocol/raw_context.ml +++ b/src/proto_alpha/lib_protocol/raw_context.ml @@ -227,6 +227,9 @@ type back = { Cycle_repr.Map.t; stake_distribution_for_current_cycle : Tez_repr.t Signature.Public_key_hash.Map.t option; + tx_rollups_seen : Tx_rollup_repr.Set.t; + (** Record the transaction rollups which have received at + least one message in a block. *) } (* @@ -325,6 +328,19 @@ let[@inline] update_non_consensus_operations_rev ctxt let[@inline] update_sampler_state ctxt sampler_state = update_back ctxt {ctxt.back with sampler_state} +let[@inline] record_tx_rollup ctxt tx_rollup = + update_back + ctxt + { + ctxt.back with + tx_rollups_seen = + Tx_rollup_repr.Set.add tx_rollup ctxt.back.tx_rollups_seen; + } + +let[@inline] flush_tx_rollups ctxt = + ( update_back ctxt {ctxt.back with tx_rollups_seen = Tx_rollup_repr.Set.empty}, + ctxt.back.tx_rollups_seen ) + type error += Too_many_internal_operations (* `Permanent *) type error += Block_quota_exceeded (* `Temporary *) @@ -764,6 +780,7 @@ let prepare ~level ~predecessor_timestamp ~timestamp ctxt = non_consensus_operations_rev = []; sampler_state = Cycle_repr.Map.empty; stake_distribution_for_current_cycle = None; + tx_rollups_seen = Tx_rollup_repr.Set.empty; }; } @@ -888,6 +905,7 @@ let prepare_first_block ~level ~timestamp ctxt = tx_rollup_hard_size_limit_per_message = 5_000; tx_rollup_commitment_bond = Tez_repr.of_mutez_exn 10_000_000_000L; tx_rollup_finality_period = 2_000; + tx_rollup_withdraw_period = 60_000; tx_rollup_max_unfinalized_levels = 2_100; sc_rollup_enable = false; (* The following value is chosen to prevent spam. *) diff --git a/src/proto_alpha/lib_protocol/raw_context.mli b/src/proto_alpha/lib_protocol/raw_context.mli index 605a786ebe85..a85c410bf0c2 100644 --- a/src/proto_alpha/lib_protocol/raw_context.mli +++ b/src/proto_alpha/lib_protocol/raw_context.mli @@ -124,6 +124,14 @@ val spend_collected_fees_only_call_from_token : t -> Tez_repr.t -> t tzresult producer's account at finalize_application *) val get_collected_fees : t -> Tez_repr.t +(** [record_tx_rollup ctxt tx_rollup] records that [tx_rollup] has + received at least one message at the current level. *) +val record_tx_rollup : t -> Tx_rollup_repr.t -> t + +(** [flush_tx_rollups ctxt] returns set of recorded transaction + rollups, and empties it in [ctxt]. *) +val flush_tx_rollups : t -> t * Tx_rollup_repr.Set.t + type error += Gas_limit_too_high (* `Permanent *) val check_gas_limit_is_valid : t -> 'a Gas_limit_repr.Arith.t -> unit tzresult diff --git a/src/proto_alpha/lib_protocol/storage.ml b/src/proto_alpha/lib_protocol/storage.ml index 22e37743645e..566424dcee48 100644 --- a/src/proto_alpha/lib_protocol/storage.ml +++ b/src/proto_alpha/lib_protocol/storage.ml @@ -1397,21 +1397,18 @@ module Tx_rollup = struct Make_indexed_subcontext (Make_subcontext (Registered) (Raw_context) (struct - let name = ["level_index"] + let name = ["tx_level"] end)) - (Make_index (Raw_level_repr.Index)) + (Make_index (Tx_rollup_level_repr.Index)) module Level_tx_rollup_context = Make_indexed_subcontext (Make_subcontext (Registered) (Level_context.Raw_context) (struct - let name = ["tx_rollup_index"] + let name = ["tx_rollup"] end)) (Make_index (Tx_rollup_repr.Index)) - let fold ctxt level = - Level_tx_rollup_context.fold_keys (ctxt, level) ~order:`Undefined - module Inbox_metadata = Level_tx_rollup_context.Make_carbonated_map (struct @@ -1465,7 +1462,7 @@ module Tx_rollup = struct end)) (Pair (Make_index - (Raw_level_repr.Index)) + (Tx_rollup_level_repr.Index)) (Make_index (Tx_rollup_repr.Index))) module Commitment = diff --git a/src/proto_alpha/lib_protocol/storage.mli b/src/proto_alpha/lib_protocol/storage.mli index a2471b067ec2..0fe84a74183d 100644 --- a/src/proto_alpha/lib_protocol/storage.mli +++ b/src/proto_alpha/lib_protocol/storage.mli @@ -593,11 +593,12 @@ module Tx_rollup : sig and type value = Tx_rollup_state_repr.t and type t := Raw_context.t - (** The number of bytes allocated by the messages stored in each inbox, - as well as its predecessor and successor. *) + (** Each inbox has a set of metadata attached to it. See + {!Tx_rollup_inbox_repr.metadata} for a description of the actual + content. *) module Inbox_metadata : Non_iterable_indexed_carbonated_data_storage - with type t := Raw_context.t * Raw_level_repr.t + with type t := Raw_context.t * Tx_rollup_level_repr.t and type key = Tx_rollup_repr.t and type value = Tx_rollup_inbox_repr.metadata @@ -611,45 +612,36 @@ module Tx_rollup : sig module Inbox_contents : sig include Non_iterable_indexed_carbonated_data_storage - with type t := (Raw_context.t * Raw_level_repr.t) * Tx_rollup_repr.t + with type t := + (Raw_context.t * Tx_rollup_level_repr.t) * Tx_rollup_repr.t and type key = int32 and type value = Tx_rollup_message_repr.hash - (** [list_values ?offset ?length ((ctxt, level), tx_rollup)] returns - the list of message hash of the inbox of [tx_rollup] at [level]. + (** [list_values ?offset ?length ((ctxt, tx_level), rollup)] + returns the list of message hashes of the inbox of [rollup] at + [tx_level]. - [length] and [offset] can be used to retreive a subset of the + [length] and [offset] can be used to retrieve a subset of the result. [length] is the maximum number of elements to fetch. A - negative [length] produces an empty list of result. [offset] + negative [length] produces an empty list of results. [offset] is the number of elements to ignore. If [offset] is negative, - then it is treated as if it was equal to [0]. + then it is treated as if it were equal to [0]. {b: Note:} This is the same HACK as [Big_map.Contents]. **) val list_values : ?offset:int -> ?length:int -> - (Raw_context.t * Raw_level_repr.t) * Tx_rollup_repr.t -> + (Raw_context.t * Tx_rollup_level_repr.t) * Tx_rollup_repr.t -> (Raw_context.t * Tx_rollup_message_repr.hash list) tzresult Lwt.t end - (** [fold (ctxt, level) ~order ~init ~f] traverses all rollups with - a nonempty inbox at [level]. - - No assurances whatsoever are provided regarding the order of - traversal. *) - val fold : - Raw_context.t -> - Raw_level_repr.t -> - init:'a -> - f:(Tx_rollup_repr.t -> 'a -> 'a Lwt.t) -> - 'a Lwt.t - - (* A commitments for each rollup and level. The level, - here, is the level committed to (not the level the commitment was - submitted). *) + (* A rollup can have at most one commitment per rollup level. Some + metadata are sauved in addition to the commitment itself. See + {!Tx_rollup_commitment_repr.Submitted_commitment.t} for the exact + content. *) module Commitment : Non_iterable_indexed_carbonated_data_storage - with type key = Raw_level_repr.t * Tx_rollup_repr.t + with type key = Tx_rollup_level_repr.t * Tx_rollup_repr.t and type value = Tx_rollup_commitment_repr.Submitted_commitment.t and type t := Raw_context.t diff --git a/src/proto_alpha/lib_protocol/test/helpers/block.ml b/src/proto_alpha/lib_protocol/test/helpers/block.ml index eb84be51cd49..c12de97beeab 100644 --- a/src/proto_alpha/lib_protocol/test/helpers/block.ml +++ b/src/proto_alpha/lib_protocol/test/helpers/block.ml @@ -701,9 +701,11 @@ let bake_n_with_all_balance_updates ?(baking_mode = Application) ?policy | Reveal_result _ | Delegation_result _ | Set_deposits_limit_result _ | Tx_rollup_origination_result _ | Tx_rollup_submit_batch_result _ | Tx_rollup_commit_result _ - | Tx_rollup_return_bond_result _ | Tx_rollup_finalize_result _ - | Sc_rollup_originate_result _ | Sc_rollup_add_messages_result _ - -> + | Tx_rollup_return_bond_result _ + | Tx_rollup_finalize_commitment_result _ + | Tx_rollup_remove_commitment_result _ + | Tx_rollup_rejection_result _ | Sc_rollup_originate_result _ + | Sc_rollup_add_messages_result _ -> balance_updates_rev | Transaction_result (Transaction_to_contract_result {balance_updates; _}) @@ -738,7 +740,9 @@ let bake_n_with_origination_results ?(baking_mode = Application) ?policy n b = | Successful_manager_result (Tx_rollup_submit_batch_result _) | Successful_manager_result (Tx_rollup_commit_result _) | Successful_manager_result (Tx_rollup_return_bond_result _) - | Successful_manager_result (Tx_rollup_finalize_result _) + | Successful_manager_result (Tx_rollup_finalize_commitment_result _) + | Successful_manager_result (Tx_rollup_remove_commitment_result _) + | Successful_manager_result (Tx_rollup_rejection_result _) | Successful_manager_result (Sc_rollup_originate_result _) | Successful_manager_result (Sc_rollup_add_messages_result _) -> origination_results_rev diff --git a/src/proto_alpha/lib_protocol/test/helpers/context.ml b/src/proto_alpha/lib_protocol/test/helpers/context.ml index 8fe76af112a8..017b526a8f9a 100644 --- a/src/proto_alpha/lib_protocol/test/helpers/context.ml +++ b/src/proto_alpha/lib_protocol/test/helpers/context.ml @@ -183,6 +183,9 @@ let get_seed ctxt = Alpha_services.Seed.get rpc_ctxt ctxt let get_constants ctxt = Alpha_services.Constants.all rpc_ctxt ctxt +let default_test_contants = + Tezos_protocol_alpha_parameters.Default_parameters.constants_test + let get_baking_reward_fixed_portion ctxt = get_constants ctxt >>=? fun {Constants.parametric = {baking_reward_fixed_portion; _}; _} -> diff --git a/src/proto_alpha/lib_protocol/test/helpers/context.mli b/src/proto_alpha/lib_protocol/test/helpers/context.mli index 22b42a176d11..062752889397 100644 --- a/src/proto_alpha/lib_protocol/test/helpers/context.mli +++ b/src/proto_alpha/lib_protocol/test/helpers/context.mli @@ -73,6 +73,10 @@ val get_seed : t -> Seed.seed tzresult Lwt.t (** Returns all the constants of the protocol *) val get_constants : t -> Constants.t tzresult Lwt.t +(** The default constants used in the test framework. To be used with + [init_with_constants]. *) +val default_test_contants : Constants.parametric + val get_baking_reward_fixed_portion : t -> Tez.t tzresult Lwt.t val get_bonus_reward : t -> endorsing_power:int -> Tez.t tzresult Lwt.t @@ -178,7 +182,8 @@ module Tx_rollup : sig (** [inbox ctxt tx_rollup] returns the inbox of this transaction rollup at the current level. If the inbox does not exist, the function returns an error. *) - val inbox : t -> Tx_rollup.t -> Tx_rollup_inbox.t tzresult Lwt.t + val inbox : + t -> Tx_rollup.t -> Tx_rollup_level.t -> Tx_rollup_inbox.t tzresult Lwt.t end (** [init n] : returns an initial block with [n] initialized accounts diff --git a/src/proto_alpha/lib_protocol/test/helpers/op.ml b/src/proto_alpha/lib_protocol/test/helpers/op.ml index 36618fd37221..5ab258d527d8 100644 --- a/src/proto_alpha/lib_protocol/test/helpers/op.ml +++ b/src/proto_alpha/lib_protocol/test/helpers/op.ml @@ -582,7 +582,21 @@ let tx_rollup_return_bond ?counter ?fee ?gas_limit ?storage_limit ctxt sign account.sk ctxt to_sign_op let tx_rollup_finalize ?counter ?fee ?gas_limit ?storage_limit ctxt - (source : Contract.t) (tx_rollup : Tx_rollup.t) (level : Raw_level.t) = + (source : Contract.t) (tx_rollup : Tx_rollup.t) = + manager_operation + ?counter + ?fee + ?gas_limit + ?storage_limit + ~source + ctxt + (Tx_rollup_finalize_commitment {tx_rollup}) + >>=? fun to_sign_op -> + Context.Contract.manager ctxt source >|=? fun account -> + sign account.sk ctxt to_sign_op + +let tx_rollup_remove_commitment ?counter ?fee ?gas_limit ?storage_limit ctxt + (source : Contract.t) (tx_rollup : Tx_rollup.t) = manager_operation ?counter ?fee @@ -590,7 +604,7 @@ let tx_rollup_finalize ?counter ?fee ?gas_limit ?storage_limit ctxt ?storage_limit ~source ctxt - (Tx_rollup_finalize {tx_rollup; level}) + (Tx_rollup_remove_commitment {tx_rollup}) >>=? fun to_sign_op -> Context.Contract.manager ctxt source >|=? fun account -> sign account.sk ctxt to_sign_op diff --git a/src/proto_alpha/lib_protocol/test/helpers/op.mli b/src/proto_alpha/lib_protocol/test/helpers/op.mli index 1ca1b9e11e91..363e10e94c1f 100644 --- a/src/proto_alpha/lib_protocol/test/helpers/op.mli +++ b/src/proto_alpha/lib_protocol/test/helpers/op.mli @@ -276,7 +276,7 @@ val tx_rollup_return_bond : Tx_rollup.t -> Operation.packed tzresult Lwt.t -(** [tx_rollup_Finalize ctxt source tx_rollup] finalizes the most recent +(** [tx_rollup_finalize ctxt source tx_rollup] finalizes the most recent final level of a rollup. *) val tx_rollup_finalize : ?counter:Z.t -> @@ -286,5 +286,16 @@ val tx_rollup_finalize : Context.t -> Contract.t -> Tx_rollup.t -> - Raw_level.t -> + Operation.packed tzresult Lwt.t + +(** [tx_rollup_remove_commitment ctxt source tx_rollup] tries to + remove a commitment from the rollup context. *) +val tx_rollup_remove_commitment : + ?counter:Z.t -> + ?fee:Tez.tez -> + ?gas_limit:Gas.Arith.integral -> + ?storage_limit:Z.t -> + Context.t -> + Contract.t -> + Tx_rollup.t -> Operation.packed tzresult Lwt.t diff --git a/src/proto_alpha/lib_protocol/test/integration/operations/test_tx_rollup.ml b/src/proto_alpha/lib_protocol/test/integration/operations/test_tx_rollup.ml index f333c83aa74c..f769a9f91f8c 100644 --- a/src/proto_alpha/lib_protocol/test/integration/operations/test_tx_rollup.ml +++ b/src/proto_alpha/lib_protocol/test/integration/operations/test_tx_rollup.ml @@ -106,12 +106,17 @@ let check_batch_in_inbox : to not interfere with balances prediction. It returns the created context and [n] contracts. *) let context_init n = - Context.init - ~consensus_threshold:0 - ~tx_rollup_enable:true - ~endorsing_reward_per_slot:Tez.zero - ~baking_reward_bonus_per_slot:Tez.zero - ~baking_reward_fixed_portion:Tez.zero + Context.init_with_constants + { + Context.default_test_contants with + consensus_threshold = 0; + tx_rollup_enable = true; + tx_rollup_finality_period = 1; + tx_rollup_withdraw_period = 1; + endorsing_reward_per_slot = Tez.zero; + baking_reward_bonus_per_slot = Tez.zero; + baking_reward_fixed_portion = Tez.zero; + } n (** [originate b contract] originates a tx_rollup from [contract], @@ -140,6 +145,9 @@ let init_originate_and_submit ?(batch = String.make 5 'c') () = let commitment_testable = Alcotest.testable Tx_rollup_commitment.pp Tx_rollup_commitment.( = ) +let commitment_hash_testable = + Alcotest.testable Tx_rollup_commitment_hash.pp Tx_rollup_commitment_hash.( = ) + let public_key_hash_testable = Alcotest.testable Signature.Public_key_hash.pp Signature.Public_key_hash.( = ) @@ -219,15 +227,10 @@ let make_commitment_for_batch i level tx_rollup = in batch) >>=? fun batches -> - (match metadata.predecessor with + (match Tx_rollup_level.pred level with | None -> return_none | Some predecessor_level -> ( - wrap - (Lwt.return - @@ Raw_level.of_int32 (Raw_level_repr.to_int32 predecessor_level)) - >>=? fun predecessor_level -> - wrap - (Tx_rollup_commitment.get_commitment ctxt tx_rollup predecessor_level) + wrap (Tx_rollup_commitment.find ctxt tx_rollup predecessor_level) >|=? function | (_, None) -> None | (_, Some {commitment; _}) -> Some (Tx_rollup_commitment.hash commitment) @@ -330,7 +333,7 @@ let test_burn_per_byte_update () = Alpha_context.Tx_rollup_state.Internal_for_tests.make ~burn_per_byte ~inbox_ema - ~last_inbox_level:None + () in let state = Alpha_context.Tx_rollup_state.Internal_for_tests.update_burn_per_byte @@ -387,7 +390,7 @@ let test_add_batch () = let contents = String.make contents_size 'c' in init_originate_and_submit ~batch:contents () >>=? fun ((contract, balance), state, tx_rollup, b) -> - Context.Tx_rollup.inbox (B b) tx_rollup + Context.Tx_rollup.inbox (B b) tx_rollup Tx_rollup_level.root >>=? fun {contents; cumulated_size; hash} -> let length = List.length contents in let expected_hash = @@ -418,7 +421,7 @@ let test_add_batch_with_limit () = op ~expect_failure: (check_proto_error (function - | Tx_rollup_state_repr.Tx_rollup_submit_batch_burn_excedeed _ -> true + | Tx_rollup_errors.Submit_batch_burn_excedeed _ -> true | _ -> false)) >>=? fun _ -> return_unit @@ -446,7 +449,10 @@ let test_add_two_batches () = contents2 >>=? fun op2 -> Block.bake ~operations:[op1; op2] b >>=? fun b -> - Context.Tx_rollup.inbox (B b) tx_rollup >>=? fun inbox -> + (* There were a first inbox with one message, and we are looking for + its successor. *) + Context.Tx_rollup.inbox (B b) tx_rollup Tx_rollup_level.(succ root) + >>=? fun inbox -> let length = List.length inbox.contents in let expected_cumulated_size = contents_size1 + contents_size2 in @@ -458,10 +464,8 @@ let test_add_two_batches () = expected_cumulated_size inbox.cumulated_size) ; - Context.Tx_rollup.inbox (B b) tx_rollup >>=? fun {contents; _} -> Incremental.begin_construction b >>=? fun incr -> let ctxt = Incremental.alpha_ctxt incr in - Alcotest.(check int "Expect an inbox with two items" 2 (List.length contents)) ; check_batch_in_inbox ctxt inbox 0 contents1 >>=? fun () -> check_batch_in_inbox ctxt inbox 1 contents2 >>=? fun () -> inbox_burn state expected_cumulated_size >>?= fun cost -> @@ -487,8 +491,7 @@ let test_batch_too_big () = | Error trace -> check_proto_error (function - | Tx_rollup_inbox.Tx_rollup_message_size_exceeds_limit -> true - | _ -> false) + | Tx_rollup_errors.Message_size_exceeds_limit -> true | _ -> false) trace (** [fill_inbox b tx_rollup contract contents k] fills the inbox of @@ -544,8 +547,7 @@ let test_inbox_too_big () = op ~expect_failure: (check_proto_error (function - | Tx_rollup_inbox.Tx_rollup_inbox_size_would_exceed_limit _ -> - true + | Tx_rollup_errors.Inbox_size_would_exceed_limit _ -> true | _ -> false)) >>=? fun _i -> return_unit) @@ -579,7 +581,7 @@ let test_valid_deposit () = >>=? fun operation -> Block.bake ~operation b >>=? fun b -> Incremental.begin_construction b >|=? Incremental.alpha_ctxt >>=? fun ctxt -> - Context.Tx_rollup.inbox (B b) tx_rollup >>=? function + Context.Tx_rollup.inbox (B b) tx_rollup Tx_rollup_level.root >>=? function | {contents = [hash]; _} -> let ticket_hash = make_unit_ticket_key ctxt contract tx_rollup in let (message, _size) = @@ -835,75 +837,6 @@ let test_finalization () = inbox_burn state contents_size >>?= fun cost -> Assert.balance_was_debited ~loc:__LOC__ (B b) contract balance cost -let test_inbox_linked_list () = - let assert_level_equals ~loc expected actual = - match actual with - | None -> raise (Invalid_argument "Error: No level found") - | Some level -> - Assert.equal - ~loc - Raw_level.equal - "expected same level" - Raw_level.pp - expected - level - in - context_init 1 >>=? fun (b, contracts) -> - let contract = - WithExceptions.Option.get ~loc:__LOC__ @@ List.nth contracts 0 - in - originate b contract >>=? fun (b, tx_rollup) -> - Context.Tx_rollup.state (B b) tx_rollup >>=? fun state -> - let last_inbox_level = Tx_rollup_state.last_inbox_level state in - Assert.is_none ~loc:__LOC__ ~pp:Raw_level.pp last_inbox_level >>=? fun () -> - Op.tx_rollup_submit_batch (B b) contract tx_rollup "batch" - >>=? fun operation -> - Block.bake ~operation b >>=? fun b -> - Incremental.begin_construction b >>=? fun i -> - Context.Tx_rollup.state (B b) tx_rollup >>=? fun state -> - let last_inbox_level = Tx_rollup_state.last_inbox_level state in - assert_level_equals ~loc:__LOC__ (raw_level 2l) last_inbox_level - >>=? fun () -> - (* This inbox has no predecessor link because it's the first inbox in - this rollup, and no successor because no other inbox has yet been - created. *) - wrap - (Tx_rollup_inbox.get_adjacent_levels - (Incremental.alpha_ctxt i) - (raw_level 2l) - tx_rollup) - >>=? fun (_, before, after) -> - Assert.is_none ~loc:__LOC__ ~pp:Raw_level.pp before >>=? fun () -> - Assert.is_none ~loc:__LOC__ ~pp:Raw_level.pp after >>=? fun () -> - (* Bake an empty block so that we skip a level*) - Block.bake b >>=? fun b -> - Op.tx_rollup_submit_batch (B b) contract tx_rollup "batch" - >>=? fun operation -> - Block.bake ~operation b >>=? fun b -> - Incremental.begin_construction b >>=? fun i -> - Context.Tx_rollup.state (B b) tx_rollup >>=? fun state -> - let last_inbox_level = Tx_rollup_state.last_inbox_level state in - assert_level_equals ~loc:__LOC__ (raw_level 4l) last_inbox_level - >>=? fun () -> - (* The new inbox has a predecessor of the previous one *) - wrap - (Tx_rollup_inbox.get_adjacent_levels - (Incremental.alpha_ctxt i) - (raw_level 4l) - tx_rollup) - >>=? fun (_, before, after) -> - assert_level_equals ~loc:__LOC__ (raw_level 2l) before >>=? fun () -> - Assert.is_none ~loc:__LOC__ ~pp:Raw_level.pp after >>=? fun () -> - (* And now the old inbox has a successor but still no predecessor*) - wrap - (Tx_rollup_inbox.get_adjacent_levels - (Incremental.alpha_ctxt i) - (raw_level 2l) - tx_rollup) - >>=? fun (_, before, after) -> - Assert.is_none ~loc:__LOC__ ~pp:Raw_level.pp before >>=? fun () -> - assert_level_equals ~loc:__LOC__ (raw_level 4l) after >>=? fun () -> return () - (** [test_commitment_duplication] originates a rollup, and makes a commitment. It attempts to add a second commitment for the same level, and ensures that this fails. It adds a commitment with @@ -918,65 +851,78 @@ let test_commitment_duplication () = in let pkh1 = is_implicit_exn contract1 in originate b contract1 >>=? fun (b, tx_rollup) -> - Context.Contract.balance (B b) contract1 >>=? fun balance -> + Context.Contract.balance (B b) contract1 >>=? fun _balance -> Context.Contract.balance (B b) contract2 >>=? fun balance2 -> (* In order to have a permissible commitment, we need a transaction. *) let contents = "batch" in Op.tx_rollup_submit_batch (B b) contract1 tx_rollup contents >>=? fun operation -> - let level = raw_level 2l in Block.bake ~operation b >>=? fun b -> Incremental.begin_construction b >>=? fun i -> - make_commitment_for_batch i level tx_rollup >>=? fun commitment -> - let submitted_level = (Level.current (Incremental.alpha_ctxt i)).level in - Op.tx_rollup_commit (I i) contract1 tx_rollup commitment >>=? fun op -> - Incremental.add_operation i op >>=? fun i -> - let cost = Tez.of_mutez_exn 10_000_000_000L in - Assert.balance_was_debited ~loc:__LOC__ (I i) contract1 balance cost - >>= fun _ -> - (* Successfully fail to submit a duplicate commitment *) - Op.tx_rollup_commit (I i) contract2 tx_rollup commitment >>=? fun op -> - Incremental.add_operation - i - op - ~expect_failure: - (check_proto_error @@ function - | Tx_rollup_commitment.Level_already_has_commitment level1 -> - level = level1 - | _ -> false) - >>=? fun i -> + make_commitment_for_batch i Tx_rollup_level.root tx_rollup + >>=? fun commitment -> + (* Successfully fail to submit a different commitment from contract2 *) let batches2 : Tx_rollup_commitment.batch_commitment list = [{root = Bytes.make 20 '1'}; {root = Bytes.make 20 '2'}] in - let commitment2 : Tx_rollup_commitment.t = + let commitment_with_wrong_count : Tx_rollup_commitment.t = {commitment with batches = batches2} in - (* Successfully fail to submit a different commitment from contract2 *) - Op.tx_rollup_commit (I i) contract2 tx_rollup commitment2 >>=? fun op -> + Op.tx_rollup_commit (I i) contract2 tx_rollup commitment_with_wrong_count + >>=? fun op -> Incremental.add_operation i op ~expect_failure: (check_proto_error @@ function - | Tx_rollup_commitment.Wrong_batch_count -> true + | Tx_rollup_errors.Wrong_batch_count -> true | _ -> false) >>=? fun i -> + (* Submit the correct one *) + let submitted_level = (Level.current (Incremental.alpha_ctxt i)).level in + Op.tx_rollup_commit (I i) contract1 tx_rollup commitment >>=? fun op -> + Incremental.add_operation i op >>=? fun i -> + (* TODO/TORU: https://gitlab.com/tezos/tezos/-/merge_requests/4437 *) + (* let cost = Tez.of_mutez_exn 10_000_000_000L in *) + (* Assert.balance_was_debited ~loc:__LOC__ (I i) contract1 balance cost *) + (* >>=? fun () -> *) + (* Successfully fail to submit a duplicate commitment *) + Op.tx_rollup_commit (I i) contract2 tx_rollup commitment >>=? fun op -> + (Incremental.add_operation i op >>= function + | Ok _ -> failwith "an error was expected" + | Error e -> + check_proto_error + (function + | Tx_rollup_errors.Level_already_has_commitment level1 -> + Tx_rollup_level.root = level1 + | _ -> false) + e) + >>=? fun _ -> (* No charge. *) Assert.balance_was_debited ~loc:__LOC__ (I i) contract2 balance2 Tez.zero >>=? fun () -> let ctxt = Incremental.alpha_ctxt i in - wrap (Tx_rollup_commitment.get_commitment ctxt tx_rollup level) + wrap (Tx_rollup_commitment.find ctxt tx_rollup Tx_rollup_level.root) >>=? fun (_, commitment_opt) -> (match commitment_opt with | None -> raise (Invalid_argument "No commitment") - | Some {commitment = expected_commitment; committer; submitted_at} -> + | Some + { + commitment = expected_commitment; + commitment_hash = expected_hash; + committer; + submitted_at; + finalized_at; + } -> Alcotest.( check commitment_testable "Commitment" expected_commitment commitment) ; - + Alcotest.( + check commitment_hash_testable "Commitment hash" expected_hash + @@ Tx_rollup_commitment.hash commitment) ; Alcotest.(check public_key_hash_testable "Committer" pkh1 committer) ; - Alcotest.( - check raw_level_testable "Submitted" submitted_level submitted_at)) ; + check raw_level_testable "Submitted" submitted_level submitted_at) ; + Alcotest.(check (option raw_level_testable) "Finalized" None finalized_at)) ; check_bond ctxt tx_rollup contract1 1 >>=? fun () -> check_bond ctxt tx_rollup contract2 0 >>=? fun () -> ignore i ; @@ -1002,7 +948,7 @@ let assert_ok res = | Ok r -> r | Error _ -> raise (Invalid_argument "Error: assert_ok") -let raw_level level = assert_ok @@ Raw_level.of_int32 level +let tx_level level = assert_ok @@ Tx_rollup_level.of_int32 level (** [test_commitment_predecessor] tests commitment predecessor edge cases *) let test_commitment_predecessor () = @@ -1016,112 +962,61 @@ let test_commitment_predecessor () = Incremental.begin_construction b >>=? fun i -> (* Check error: Commitment for nonexistent block *) let bogus_hash = - Tx_rollup_commitment.Commitment_hash.of_bytes_exn + Tx_rollup_commitment_hash.of_bytes_exn (Bytes.of_string "tcu1deadbeefdeadbeefdeadbeefdead") in - make_commitment_for_batch i (raw_level 2l) tx_rollup >>=? fun commitment -> - let commitment = - {commitment with level = raw_level 1l; predecessor = Some bogus_hash} - in - Op.tx_rollup_commit (I i) contract1 tx_rollup commitment >>=? fun op -> + make_commitment_for_batch i Tx_rollup_level.root tx_rollup + >>=? fun commitment -> + let commitment_for_invalid_inbox = {commitment with level = tx_level 10l} in + Op.tx_rollup_commit (I i) contract1 tx_rollup commitment_for_invalid_inbox + >>=? fun op -> let error = - Tx_rollup_inbox.Tx_rollup_inbox_does_not_exist (tx_rollup, raw_level 1l) + Tx_rollup_errors.Commitment_too_early + {provided = tx_level 10l; expected = tx_level 0l} in - Incremental.add_operation - i - op - ~expect_failure:(check_proto_error (( = ) error)) - >>=? fun i -> - (* Now we create a real commitment *) - make_commitment_for_batch i (raw_level 2l) tx_rollup >>=? fun commitment -> + (Incremental.add_operation i op >>= function + | Ok _ -> failwith "This shouldn’t have succeeded" + | Error e -> check_proto_error (( = ) error) e) + >>=? fun () -> + (* Now we submit a real commitment *) Op.tx_rollup_commit (I i) contract1 tx_rollup commitment >>=? fun op -> Incremental.add_operation i op >>=? fun i -> (* Commitment without predecessor for block with predecessor*) - make_commitment_for_batch i (raw_level 3l) tx_rollup >>=? fun commitment -> - let commitment = {commitment with predecessor = None} in - Op.tx_rollup_commit (I i) contract1 tx_rollup commitment >>=? fun op -> + make_commitment_for_batch i Tx_rollup_level.(succ root) tx_rollup + >>=? fun commitment -> + let commitment_with_missing_predecessor = + {commitment with predecessor = None} + in + Op.tx_rollup_commit + (I i) + contract1 + tx_rollup + commitment_with_missing_predecessor + >>=? fun op -> Incremental.add_operation i op ~expect_failure: (check_proto_error @@ function - | Tx_rollup_commitment.Wrong_commitment_predecessor_level -> true + | Tx_rollup_errors.Wrong_predecessor_hash {provided = None; expected} -> + expected = commitment.predecessor | _ -> false) >>=? fun i -> (* Commitment refers to a predecessor which does not exist *) - make_commitment_for_batch i (raw_level 3l) tx_rollup >>=? fun commitment -> - let commitment = {commitment with predecessor = Some bogus_hash} in - Op.tx_rollup_commit (I i) contract1 tx_rollup commitment >>=? fun op -> + let commitment_with_wrong_pred = + {commitment with predecessor = Some bogus_hash} + in + Op.tx_rollup_commit (I i) contract1 tx_rollup commitment_with_wrong_pred + >>=? fun op -> Incremental.add_operation i op ~expect_failure: (check_proto_error @@ function - | Tx_rollup_commitment.Missing_commitment_predecessor -> true + | Tx_rollup_errors.Wrong_predecessor_hash {provided = _; expected} -> + expected = commitment.predecessor | _ -> false) >>=? fun i -> - (* Try to commit to an empty level between full ones *) - let commitment : Tx_rollup_commitment.t = - {commitment with level = raw_level 5l} - in - Op.tx_rollup_commit (I i) contract1 tx_rollup commitment >>=? fun op -> - let error = - Tx_rollup_inbox.Tx_rollup_inbox_does_not_exist (tx_rollup, raw_level 5l) - in - Incremental.add_operation - i - op - ~expect_failure:(check_proto_error (( = ) error)) - >>=? fun i -> - ignore i ; - return () - -(** [test_commitment_retire_simple] tests commitment retirement simple cases. - Note that it manually retires commitments rather than waiting for them to - age out. *) -let test_commitment_retire () = - context_init 1 >>=? fun (b, contracts) -> - let contract1 = - WithExceptions.Option.get ~loc:__LOC__ @@ List.nth contracts 0 - in - originate b contract1 >>=? fun (b, tx_rollup) -> - (* In order to have a permissible commitment, we need a transaction. *) - let contents = "batch" in - Op.tx_rollup_submit_batch (B b) contract1 tx_rollup contents - >>=? fun operation -> - Block.bake ~operation b >>=? fun b -> - Incremental.begin_construction b >>=? fun i -> - let level = raw_level 2l in - (* Test retirement with no commitment *) - wrap - (Tx_rollup_commitment.Internal_for_tests.retire_rollup_level - (Incremental.alpha_ctxt i) - tx_rollup - level - (raw_level @@ Incremental.level i)) - >>=? fun (_ctxt, retired) -> - (match retired with - | `No_commitment -> return_unit - | _ -> failwith "Expected no commitment") - >>=? fun () -> - (* Now, make a commitment *) - make_commitment_for_batch i level tx_rollup >>=? fun commitment -> - Op.tx_rollup_commit (I i) contract1 tx_rollup commitment >>=? fun op -> - Incremental.add_operation i op >>=? fun i -> - let commitment_submit_level = - (Level.current (Incremental.alpha_ctxt i)).level - in - check_bond (Incremental.alpha_ctxt i) tx_rollup contract1 1 >>=? fun () -> - (* We can retire this level *) - wrap - (Tx_rollup_commitment.Internal_for_tests.retire_rollup_level - (Incremental.alpha_ctxt i) - tx_rollup - level - commitment_submit_level) - >>=? fun (ctxt, retired) -> - assert_retired retired >>=? fun () -> - check_bond ctxt tx_rollup contract1 0 >>=? fun () -> ignore i ; return () @@ -1150,19 +1045,17 @@ let test_full_inbox () = make_transactions_in tx_rollup contract (range 2 17) b >>=? fun b -> Incremental.begin_construction b >>=? fun i -> Op.tx_rollup_submit_batch (B b) contract tx_rollup "contents" >>=? fun op -> - Incremental.add_operation i op ~expect_failure:(function - | Environment.Ecoproto_error - (Tx_rollup_commitment.Too_many_unfinalized_levels as e) - :: _ -> - Assert.test_error_encodings e ; - return_unit - | _ -> failwith "Need to avoid too many unfinalized inboxes") + Incremental.add_operation + i + op + ~expect_failure: + (check_proto_error @@ ( = ) Tx_rollup_errors.Too_many_inboxes) >>=? fun i -> ignore i ; return () -(** [test_bond_finalization] tests that level retirement - in fact allows bonds to be returned. *) +(** [test_bond_finalization] tests that level retirement in fact + allows bonds to be returned. *) let test_bond_finalization () = context_init 2 >>=? fun (b, contracts) -> let contract1 = @@ -1172,42 +1065,44 @@ let test_bond_finalization () = originate b contract1 >>=? fun (b, tx_rollup) -> (* Transactions in block 2, 3, 4 *) make_transactions_in tx_rollup contract1 [2; 3; 4] b >>=? fun b -> + (* Let’s try to remove the bond *) Incremental.begin_construction b >>=? fun i -> Op.tx_rollup_return_bond (I i) contract1 tx_rollup >>=? fun op -> - Incremental.add_operation i op ~expect_failure:(function - | Environment.Ecoproto_error - (Tx_rollup_commitment.Bond_does_not_exist a_pkh1 as e) - :: _ - when a_pkh1 = pkh1 -> - Assert.test_error_encodings e ; - return_unit - | _ -> failwith "Commitment bond should not exist yet") + Incremental.add_operation + i + op + ~expect_failure: + (check_proto_error @@ function + | Tx_rollup_errors.Bond_does_not_exist a_pkh1 -> a_pkh1 = pkh1 + | _ -> false) >>=? fun i -> - make_commitment_for_batch i (raw_level 2l) tx_rollup >>=? fun commitment_a -> + make_commitment_for_batch i Tx_rollup_level.root tx_rollup + >>=? fun commitment_a -> Op.tx_rollup_commit (I i) contract1 tx_rollup commitment_a >>=? fun op -> Incremental.add_operation i op >>=? fun i -> Op.tx_rollup_return_bond (I i) contract1 tx_rollup >>=? fun op -> - Incremental.add_operation i op ~expect_failure:(function - | Environment.Ecoproto_error - (Tx_rollup_commitment.Bond_in_use a_pkh1 as e) - :: _ - when a_pkh1 = pkh1 -> - Assert.test_error_encodings e ; - return_unit - | _ -> failwith "Need to check that bond is in-use ") + Incremental.add_operation + i + op + ~expect_failure: + (check_proto_error @@ function + | Tx_rollup_errors.Bond_in_use a_pkh1 -> a_pkh1 = pkh1 + | _ -> false) >>=? fun i -> - wrap - (Tx_rollup_commitment.Internal_for_tests.retire_rollup_level - (Incremental.alpha_ctxt i) - tx_rollup - (raw_level 2l) - (raw_level 30l)) - >>=? fun (ctxt, retired) -> - assert_retired retired >>=? fun () -> - let i = Incremental.set_alpha_ctxt i ctxt in + Incremental.finalize_block i >>=? fun b -> + (* Finalize the commitment of level 0. *) + Op.tx_rollup_finalize (B b) contract1 tx_rollup >>=? fun operation -> + Block.bake b ~operation >>=? fun b -> + (* Bake enough block, and remove the commitment of level 0. *) + Block.bake b ~operations:[] >>=? fun b -> + Op.tx_rollup_remove_commitment (B b) contract1 tx_rollup >>=? fun operation -> + Block.bake b ~operation >>=? fun b -> + (* Try to return the bond *) + Incremental.begin_construction b >>=? fun i -> Op.tx_rollup_return_bond (I i) contract1 tx_rollup >>=? fun op -> - Incremental.add_operation i op >>=? fun i -> - ignore i ; + Incremental.add_operation i op >>=? fun _ -> + (* TODO/TORU: https://gitlab.com/tezos/tezos/-/merge_requests/4437 + Once stakable bonds are merged, check the balances. *) return () let tests = @@ -1259,13 +1154,11 @@ let tests = `Quick test_valid_deposit_invalid_amount; Tztest.tztest "Test finalization" `Quick test_finalization; - Tztest.tztest "Test inbox linked list" `Quick test_inbox_linked_list; Tztest.tztest "Smoke test commitment" `Quick test_commitment_duplication; Tztest.tztest "Test commitment predecessor edge cases" `Quick test_commitment_predecessor; - Tztest.tztest "Test commitment retirement" `Quick test_commitment_retire; Tztest.tztest "Test full inbox" `Quick test_full_inbox; Tztest.tztest "Test bond finalization" `Quick test_bond_finalization; ] diff --git a/src/proto_alpha/lib_protocol/ticket_operations_diff.ml b/src/proto_alpha/lib_protocol/ticket_operations_diff.ml index a79a36684d47..65dbd4af277c 100644 --- a/src/proto_alpha/lib_protocol/ticket_operations_diff.ml +++ b/src/proto_alpha/lib_protocol/ticket_operations_diff.ml @@ -258,7 +258,9 @@ let tickets_of_operation ctxt | Tx_rollup_submit_batch _ -> return (None, ctxt) | Tx_rollup_commit _ -> return (None, ctxt) | Tx_rollup_return_bond _ -> return (None, ctxt) - | Tx_rollup_finalize _ -> return (None, ctxt) + | Tx_rollup_finalize_commitment _ -> return (None, ctxt) + | Tx_rollup_remove_commitment _ -> return (None, ctxt) + | Tx_rollup_rejection _ -> return (None, ctxt) | Sc_rollup_originate {kind = _; boot_sector = _} -> return (None, ctxt) | Sc_rollup_add_messages {rollup = _; messages = _} -> return (None, ctxt) diff --git a/src/proto_alpha/lib_protocol/tx_rollup_commitment_repr.ml b/src/proto_alpha/lib_protocol/tx_rollup_commitment_repr.ml index 3a7b47d0b10c..18adafe6c727 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_commitment_repr.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_commitment_repr.ml @@ -25,123 +25,6 @@ (* *) (*****************************************************************************) -type error += (* `Branch *) Wrong_commitment_predecessor_level - -type error += (* `Temporary *) Missing_commitment_predecessor - -type error += (* `Branch *) Wrong_batch_count - -type error += - | (* `Temporary *) Commitment_too_early of Raw_level_repr.t * Raw_level_repr.t - -type error += (* `Temporary *) Level_already_has_commitment of Raw_level_repr.t - -type error += (* `Temporary *) Wrong_inbox_hash - -type error += (* `Branch *) - Retire_uncommitted_level of Raw_level_repr.t - -type error += (* `Temporary *) - Bond_does_not_exist of Signature.public_key_hash - -type error += (* `Temporary *) Bond_in_use of Signature.public_key_hash - -type error += (* `Temporary *) Too_many_unfinalized_levels - -let () = - let open Data_encoding in - (* Wrong_commitment_predecessor_level *) - register_error_kind - `Temporary - ~id:"tx_rollup_wrong_commitment_predecessor_level" - ~title:"This commitment's predecessor is invalid" - ~description: - "This commitment has a predecessor but shouldn't, or doesn't but should" - unit - (function Wrong_commitment_predecessor_level -> Some () | _ -> None) - (fun () -> Wrong_commitment_predecessor_level) ; - (* Missing_commitment_predecessor *) - register_error_kind - `Temporary - ~id:"tx_rollup_missing_commitment_predecessor" - ~title:"This commitment refers to a predecessor that doesn't exist" - ~description:"This commitment refers to a predecessor that doesn't exist" - unit - (function Missing_commitment_predecessor -> Some () | _ -> None) - (fun () -> Missing_commitment_predecessor) ; - (* Wrong_batch_count *) - register_error_kind - `Temporary - ~id:"tx_rollup_wrong_batch_count" - ~title:"This commitment has the wrong number of batches" - ~description: - "This commitment has a different number of batches than its inbox" - unit - (function Wrong_batch_count -> Some () | _ -> None) - (fun () -> Wrong_batch_count) ; - (* Commitment_too_early *) - register_error_kind - `Temporary - ~id:"tx_rollup_commitment_too_early" - ~title:"This commitment is for a level that hasn't finished yet" - ~description:"This commitment is for a level that hasn't finished yet" - (obj2 - (req "commitment_level" Raw_level_repr.encoding) - (req "submit_level" Raw_level_repr.encoding)) - (function - | Commitment_too_early (commitment_level, submit_level) -> - Some (commitment_level, submit_level) - | _ -> None) - (fun (commitment_level, submit_level) -> - Commitment_too_early (commitment_level, submit_level)) ; - (* Level_already_has_commitment *) - register_error_kind - `Temporary - ~id:"tx_rollup_level_already_has_commitment" - ~title:"This commitment is for a level that already has a commitment" - ~description:"This commitment is for a level that already has a commitment" - (obj1 (req "level" Raw_level_repr.encoding)) - (function Level_already_has_commitment level -> Some level | _ -> None) - (fun level -> Level_already_has_commitment level) ; - (* Wrong_inbox_hash *) - register_error_kind - `Temporary - ~id:"Wrong_inbox_hash" - ~title:"This commitment has the wrong inbox hash" - ~description:"This commitment has a different hash than its inbox" - unit - (function Wrong_inbox_hash -> Some () | _ -> None) - (fun () -> Wrong_inbox_hash) ; - (* Too_many_unfinalized_levels *) - register_error_kind - `Temporary - ~id:"tx_rollup_too_many_unfinalized_levels" - ~title:"This rollup hasn't had a commitment in too long" - ~description: - "This rollup hasn't had a commitment in too long. We don't allow new \ - messages to keep commitment gas reasonable." - empty - (function Too_many_unfinalized_levels -> Some () | _ -> None) - (fun () -> Too_many_unfinalized_levels) ; - (* Bond_does_not_exist *) - register_error_kind - `Temporary - ~id:"tx_rollup_bond_does_not_exist" - ~title:"This account does not have a bond for this rollup" - ~description:"This account does not have a bond for this rollup" - (obj1 (req "contract" Signature.Public_key_hash.encoding)) - (function Bond_does_not_exist contract -> Some contract | _ -> None) - (fun contract -> Bond_does_not_exist contract) ; - (* Bond_in_use *) - register_error_kind - `Temporary - ~id:"tx_rollup_bond_in_use" - ~title:"This account's bond is in use for one or more commitments" - ~description:"This account's bond is in use for one or more commitments" - (obj1 (req "contract" Signature.Public_key_hash.encoding)) - (function Bond_in_use contract -> Some contract | _ -> None) - (fun contract -> Bond_in_use contract) - module Commitment_hash = struct let commitment_hash = "\017\249\195\013" (* toc1(54) *) @@ -206,7 +89,7 @@ let batch_commitment_equal : batch_commitment -> batch_commitment -> bool = Batch.equal type t = { - level : Raw_level_repr.t; + level : Tx_rollup_level_repr.t; batches : batch_commitment list; predecessor : Commitment_hash.t option; inbox_hash : Tx_rollup_inbox_repr.hash; @@ -220,7 +103,7 @@ include Compare.Make (struct module Compare_root_list = Compare.List (Batch) let compare r1 r2 = - compare_or Raw_level_repr.compare r1.level r2.level (fun () -> + compare_or Tx_rollup_level_repr.compare r1.level r2.level (fun () -> compare_or Compare_root_list.compare r1.batches r2.batches (fun () -> compare_or (Option.compare Commitment_hash.compare) @@ -235,7 +118,7 @@ let pp : Format.formatter -> t -> unit = Format.fprintf fmt "commitment %a : batches = %a predecessor %a for inbox %a" - Raw_level_repr.pp + Tx_rollup_level_repr.pp t.level (Format.pp_print_list Batch.pp) t.batches @@ -255,7 +138,7 @@ let encoding = (fun (level, batches, predecessor, inbox_hash) -> {level; batches; predecessor; inbox_hash}) (obj4 - (req "level" Raw_level_repr.encoding) + (req "level" Tx_rollup_level_repr.encoding) (req "batches" (list Batch.encoding)) (req "predecessor" (option Commitment_hash.encoding)) (req "inbox_hash" Tx_rollup_inbox_repr.hash_encoding)) @@ -293,19 +176,23 @@ end module Submitted_commitment = struct type nonrec t = { commitment : t; + commitment_hash : Commitment_hash.t; committer : Signature.Public_key_hash.t; submitted_at : Raw_level_repr.t; + finalized_at : Raw_level_repr.t option; } let encoding = let open Data_encoding in conv - (fun {commitment; committer; submitted_at} -> - (commitment, committer, submitted_at)) - (fun (commitment, committer, submitted_at) -> - {commitment; committer; submitted_at}) - (obj3 + (fun {commitment; commitment_hash; committer; submitted_at; finalized_at} -> + (commitment, commitment_hash, committer, submitted_at, finalized_at)) + (fun (commitment, commitment_hash, committer, submitted_at, finalized_at) -> + {commitment; commitment_hash; committer; submitted_at; finalized_at}) + (obj5 (req "commitment" encoding) + (req "commitment_hash" Commitment_hash.encoding) (req "committer" Signature.Public_key_hash.encoding) - (req "submitted_at" Raw_level_repr.encoding)) + (req "submitted_at" Raw_level_repr.encoding) + (opt "finalized_at" Raw_level_repr.encoding)) end diff --git a/src/proto_alpha/lib_protocol/tx_rollup_commitment_repr.mli b/src/proto_alpha/lib_protocol/tx_rollup_commitment_repr.mli index a73a7d707fd6..81e141400b22 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_commitment_repr.mli +++ b/src/proto_alpha/lib_protocol/tx_rollup_commitment_repr.mli @@ -25,29 +25,6 @@ (* *) (*****************************************************************************) -type error += (* `Branch *) Wrong_commitment_predecessor_level - -type error += (* `Temporary *) Missing_commitment_predecessor - -type error += (* `Branch *) Wrong_batch_count - -type error += - | (* `Temporary *) Commitment_too_early of Raw_level_repr.t * Raw_level_repr.t - -type error += (* `Temporary *) Level_already_has_commitment of Raw_level_repr.t - -type error += (* `Temporary *) Wrong_inbox_hash - -type error += (* `Branch *) - Retire_uncommitted_level of Raw_level_repr.t - -type error += (* `Temporary *) - Bond_does_not_exist of Signature.public_key_hash - -type error += (* `Temporary *) Bond_in_use of Signature.public_key_hash - -type error += (* `Temporary *) Too_many_unfinalized_levels - (** A specialized Blake2B implementation for hashing commitments with "toc1" as a base58 prefix *) module Commitment_hash : sig @@ -71,7 +48,7 @@ val batch_commitment_equal : batch_commitment -> batch_commitment -> bool with messages in this rollup, and the initial Merkle root is the empty tree. *) type t = { - level : Raw_level_repr.t; + level : Tx_rollup_level_repr.t; batches : batch_commitment list; predecessor : Commitment_hash.t option; inbox_hash : Tx_rollup_inbox_repr.hash; @@ -90,11 +67,13 @@ module Index : Storage_description.INDEX with type t = Commitment_hash.t module Submitted_commitment : sig (** When a commitment is submitted, we store the [committer] and the block the commitment was [submitted_at] along with the - [commitment] itself. *) + [commitment] itself with its hash. *) type nonrec t = { commitment : t; + commitment_hash : Commitment_hash.t; committer : Signature.Public_key_hash.t; submitted_at : Raw_level_repr.t; + finalized_at : Raw_level_repr.t option; } val encoding : t Data_encoding.t diff --git a/src/proto_alpha/lib_protocol/tx_rollup_commitment_storage.ml b/src/proto_alpha/lib_protocol/tx_rollup_commitment_storage.ml index bf6e3d32284a..ec6a707a4a4c 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_commitment_storage.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_commitment_storage.ml @@ -28,19 +28,12 @@ let just_ctxt (ctxt, _, _) = ctxt open Tx_rollup_commitment_repr - -let get_next_level ctxt tx_rollup level = - Tx_rollup_inbox_storage.get_adjacent_levels ctxt level tx_rollup - >|=? fun (ctxt, _, successor_level) -> (ctxt, successor_level) - -let get_prev_level ctxt tx_rollup level = - Tx_rollup_inbox_storage.get_adjacent_levels ctxt level tx_rollup - >|=? fun (ctxt, predecessor_level, _) -> (ctxt, predecessor_level) +open Tx_rollup_errors_repr (* This indicates a programming error. *) type error += (*`Temporary*) Commitment_bond_negative of int -let adjust_commitment_bond ctxt tx_rollup pkh delta = +let adjust_unfinalized_commitments_count ctxt tx_rollup pkh ~delta = let bond_key = (tx_rollup, pkh) in Storage.Tx_rollup.Commitment_bond.find ctxt bond_key >>=? fun (ctxt, commitment) -> @@ -65,143 +58,100 @@ let remove_bond : Storage.Tx_rollup.Commitment_bond.remove ctxt bond_key >|=? just_ctxt | Some _ -> fail (Bond_in_use contract) -(** Return the commitment hash for a level, or None if there is no commitment - for a level (or if the level is None). *) -let get_existing_hash_opt : +let find : Raw_context.t -> Tx_rollup_repr.t -> - Raw_level_repr.t option -> - (Raw_context.t * Commitment_hash.t option, error trace) result Lwt.t = + Tx_rollup_level_repr.t -> + (Raw_context.t * Tx_rollup_commitment_repr.Submitted_commitment.t option) + tzresult + Lwt.t = fun ctxt tx_rollup level -> - match level with - | None -> return (ctxt, None) - | Some level -> - Storage.Tx_rollup.Commitment.find ctxt (level, tx_rollup) - >>=? fun (ctxt, submitted_opt) -> - return - ( ctxt, - Option.map - (fun (submitted : Submitted_commitment.t) -> - Tx_rollup_commitment_repr.hash submitted.commitment) - submitted_opt ) + Storage.Tx_rollup.Commitment.find ctxt (level, tx_rollup) + >>=? fun (ctxt, commitment) -> + match commitment with + | None -> + Tx_rollup_state_storage.assert_exist ctxt tx_rollup >>=? fun ctxt -> + return (ctxt, None) + | Some res -> return (ctxt, Some res) -let check_commitment_predecessor_hash ctxt tx_rollup predecessor_level - (commitment : Tx_rollup_commitment_repr.t) = - (* Check that level has the correct predecessor *) - match (predecessor_level, commitment.predecessor) with - | (None, None) -> return ctxt - | (Some _, None) | (None, Some _) -> fail Wrong_commitment_predecessor_level - | (Some predecessor_level, Some hash) -> - (* The predecessor level must include this commitment*) - Storage.Tx_rollup.Commitment.get ctxt (predecessor_level, tx_rollup) - >>=? fun (ctxt, predecesor_commitment) -> - let expected_hash = - Tx_rollup_commitment_repr.hash predecesor_commitment.commitment - in - fail_unless - Tx_rollup_commitment_repr.Commitment_hash.(hash = expected_hash) - Missing_commitment_predecessor - >>=? fun () -> return ctxt +let get : + Raw_context.t -> + Tx_rollup_repr.t -> + Tx_rollup_level_repr.t -> + (Raw_context.t * Tx_rollup_commitment_repr.Submitted_commitment.t) tzresult + Lwt.t = + fun ctxt tx_rollup level -> + find ctxt tx_rollup level >>=? fun (ctxt, commitment) -> + match commitment with + | None -> fail @@ Tx_rollup_errors_repr.Commitment_does_not_exist level + | Some commitment -> return (ctxt, commitment) -(** Check if there is an existing commit which would conflict with this one. - If there is, and it is valid (that is, its prececessor exists with - the expected hash, return Level_already_has_commitment. *) -let check_existing_commitment ctxt tx_rollup predecessor_hash_opt commitment = - let key = (commitment.level, tx_rollup) in - Storage.Tx_rollup.Commitment.find ctxt key >>=? function - | (ctxt, None) -> return ctxt - | (ctxt, Some existing_commitment) -> ( - let expected_predecessor_hash = - existing_commitment.commitment.predecessor - in +(* TODO: Lwt.t is only useful for [fail_when] *) +let check_commitment_level state commitment = + Tx_rollup_state_repr.next_commitment_level state >>?= fun expected_level -> + fail_when + Tx_rollup_level_repr.(commitment.level < expected_level) + (Level_already_has_commitment commitment.level) + >>=? fun () -> + fail_when + Tx_rollup_level_repr.(expected_level < commitment.level) + (Commitment_too_early + {provided = commitment.level; expected = expected_level}) + >>=? fun () -> return_unit - match (predecessor_hash_opt, expected_predecessor_hash) with - | (_, None) -> - (* There is an existing commitment, and it is at the - root level, so it cannot be invalid by virtue of having - a removed predecessor. *) - fail (Level_already_has_commitment commitment.level) - | (Some predecessor_hash, Some expected_predecessor_hash) -> - (* fail if existing commitment at this level has a predecessor hash which equals predecessor_hash*) - fail_when - Tx_rollup_commitment_repr.Commitment_hash.( - expected_predecessor_hash = predecessor_hash) - Missing_commitment_predecessor - >>=? fun () -> return ctxt - | (None, Some _) -> - (* The predecessor was removed, so we can go ahead*) - return ctxt) +(** [check_commitment_predecessor ctxt tx_rollup state commitment] + will raise an error if the [predecessor] field of [commitment] is + not consistent with the context, assuming its [level] field is + correct. *) +let check_commitment_predecessor ctxt state commitment = + match + ( commitment.predecessor, + Tx_rollup_state_repr.next_commitment_predecessor state ) + with + | (Some pred_hash, Some expected_hash) + when Commitment_hash.(pred_hash = expected_hash) -> + return ctxt + | (None, None) -> return ctxt + | (provided, expected) -> fail (Wrong_predecessor_hash {provided; expected}) -let add_commitment ctxt tx_rollup pkh (commitment : Tx_rollup_commitment_repr.t) - = - let key = (commitment.level, tx_rollup) in +let check_commitment_batches ctxt tx_rollup commitment = Tx_rollup_inbox_storage.get_metadata ctxt commitment.level tx_rollup >>=? fun (ctxt, {inbox_length; hash; _}) -> - let actual_len = List.length commitment.batches in fail_unless - Compare.Int.(Int32.to_int inbox_length = actual_len) + Compare.List_length_with.(commitment.batches = Int32.to_int inbox_length) Wrong_batch_count >>=? fun () -> fail_unless (Tx_rollup_inbox_repr.equal_hash commitment.inbox_hash hash) Wrong_inbox_hash - >>=? fun () -> - let level = commitment.level in - get_prev_level ctxt tx_rollup level >>=? fun (ctxt, predecessor_level) -> - get_existing_hash_opt ctxt tx_rollup predecessor_level - >>=? fun (ctxt, predecessor_hash_opt) -> - check_existing_commitment ctxt tx_rollup predecessor_hash_opt commitment - >>=? fun ctxt -> - check_commitment_predecessor_hash ctxt tx_rollup predecessor_level commitment - >>=? fun ctxt -> + >>=? fun () -> return ctxt + +let add_commitment ctxt tx_rollup state pkh commitment = + (* Check the commitment has the correct values *) + check_commitment_level state commitment >>=? fun () -> + check_commitment_predecessor ctxt state commitment >>=? fun ctxt -> + check_commitment_batches ctxt tx_rollup commitment >>=? fun ctxt -> + (* Everything has been sorted out, let’s update the storage *) let current_level = (Raw_context.current_level ctxt).level in + let commitment_hash = Tx_rollup_commitment_repr.hash commitment in let submitted : Tx_rollup_commitment_repr.Submitted_commitment.t = - {commitment; committer = pkh; submitted_at = current_level} + { + commitment; + commitment_hash; + committer = pkh; + submitted_at = current_level; + finalized_at = None; + } in - Storage.Tx_rollup.Commitment.add ctxt key submitted >>=? fun (ctxt, _, _) -> - adjust_commitment_bond ctxt tx_rollup pkh 1 - -let retire_rollup_level : - Raw_context.t -> - Tx_rollup_repr.t -> - Raw_level_repr.t -> - Raw_level_repr.t -> - (Raw_context.t * [> `No_commitment | `Commitment_too_late | `Retired]) - tzresult - Lwt.t = - fun ctxt tx_rollup level last_level_to_finalize -> - let key = (level, tx_rollup) in - Storage.Tx_rollup.Commitment.find ctxt key >>=? function - | (_, None) -> return (ctxt, `No_commitment) - | (ctxt, Some accepted) -> - (* Before we really accept this commitment, we should check to make sure - that its predecessor is still present. If its predecessor is missing, - then this commitment cannot be correct. *) - get_prev_level ctxt tx_rollup level >>=? fun (ctxt, predecessor_level) -> - check_commitment_predecessor_hash - ctxt - tx_rollup - predecessor_level - accepted.commitment - >>=? fun ctxt -> - if Raw_level_repr.(accepted.submitted_at > last_level_to_finalize) then - return (ctxt, `Commitment_too_late) - else - adjust_commitment_bond ctxt tx_rollup accepted.committer (-1) - >>=? fun ctxt -> return (ctxt, `Retired) - -let get_commitment : - Raw_context.t -> - Tx_rollup_repr.t -> - Raw_level_repr.t -> - (Raw_context.t * Tx_rollup_commitment_repr.Submitted_commitment.t option) - tzresult - Lwt.t = - fun ctxt tx_rollup level -> - Storage.Tx_rollup.State.find ctxt tx_rollup >>=? fun (ctxt, state) -> - match state with - | None -> fail @@ Tx_rollup_state_storage.Tx_rollup_does_not_exist tx_rollup - | Some _ -> Storage.Tx_rollup.Commitment.find ctxt (level, tx_rollup) + Storage.Tx_rollup.Commitment.add ctxt (commitment.level, tx_rollup) submitted + >>=? fun (ctxt, _, _) -> + Tx_rollup_state_repr.record_commitment_creation + state + commitment.level + commitment_hash + >>?= fun state -> + adjust_unfinalized_commitments_count ctxt tx_rollup pkh ~delta:1 + >>=? fun ctxt -> return (ctxt, state) let pending_bonded_commitments : Raw_context.t -> @@ -221,40 +171,96 @@ let has_bond : Storage.Tx_rollup.Commitment_bond.find ctxt (tx_rollup, pkh) >|=? fun (ctxt, pending) -> (ctxt, Option.is_some pending) -let finalize_pending_commitments ctxt tx_rollup last_level_to_finalize = - Tx_rollup_state_storage.get ctxt tx_rollup >>=? fun (ctxt, state) -> - let first_unfinalized_level = - Tx_rollup_state_repr.first_unfinalized_level state - in - match first_unfinalized_level with - | None -> return ctxt - | Some first_unfinalized_level -> - let rec finalize_level ctxt level top finalized_count = - if Raw_level_repr.(level > top) then - return (ctxt, finalized_count, Some level) - else - retire_rollup_level ctxt tx_rollup level last_level_to_finalize - >>=? fun (ctxt, finalized) -> - match finalized with - | `Retired -> ( - get_next_level ctxt tx_rollup level >>=? fun (ctxt, next_level) -> - match next_level with - | None -> return (ctxt, 0, None) - | Some next_level -> - (finalize_level [@tailcall]) - ctxt - next_level - top - (finalized_count + 1)) - | _ -> return (ctxt, finalized_count, Some level) - in - finalize_level ctxt first_unfinalized_level last_level_to_finalize 0 - >>=? fun (ctxt, finalized_count, first_unfinalized_level) -> - let new_state = - Tx_rollup_state_repr.update_after_finalize - state - first_unfinalized_level - finalized_count - in - Storage.Tx_rollup.State.add ctxt tx_rollup new_state - >>=? fun (ctxt, _, _) -> return ctxt +let finalize_commitment ctxt rollup state = + match + Tx_rollup_state_repr.(oldest_inbox_level state, commitment_head_level state) + with + | (Some oldest_inbox_level, Some _) -> + (* Since the commitment head is not null, we know the oldest + inbox has a commitment. *) + get ctxt rollup oldest_inbox_level >>=? fun (ctxt, commitment) -> + (* Is the finality period for this commitment over? *) + let finality_period = Constants_storage.tx_rollup_finality_period ctxt in + let current_level = (Raw_context.current_level ctxt).level in + fail_when + Raw_level_repr.( + current_level < add commitment.submitted_at finality_period) + No_commitment_to_finalize + >>=? fun () -> + (* Decrement the bond count of the committer *) + adjust_unfinalized_commitments_count + ctxt + rollup + commitment.committer + ~delta:(-1) + >>=? fun ctxt -> + (* We remove the inbox *) + Tx_rollup_inbox_storage.remove ctxt oldest_inbox_level rollup + >>=? fun ctxt -> + (* We update the commitment to mark it as finalized *) + Storage.Tx_rollup.Commitment.update + ctxt + (oldest_inbox_level, rollup) + {commitment with finalized_at = Some current_level} + >>=? fun (ctxt, _) -> + (* We update the state *) + Tx_rollup_state_repr.record_inbox_deletion state oldest_inbox_level + >>?= fun state -> return (ctxt, state, oldest_inbox_level) + | _ -> fail No_commitment_to_finalize + +let remove_commitment ctxt rollup state = + match Tx_rollup_state_repr.commitment_tail_level state with + | Some tail -> + (* We check the commitment is old enough *) + get ctxt rollup tail >>=? fun (ctxt, commitment) -> + (match commitment.finalized_at with + | Some finalized_at -> + let withdraw_period = + Constants_storage.tx_rollup_withdraw_period ctxt + in + let current_level = (Raw_context.current_level ctxt).level in + fail_when + Raw_level_repr.(current_level < add finalized_at withdraw_period) + (* FIXME dedicated error *) + No_commitment_to_remove + | None -> + (* unreachable code if the implementation is correct *) + fail (Internal_error "Missing finalized_at field")) + >>=? fun () -> + (* We remove the commitment *) + Storage.Tx_rollup.Commitment.remove ctxt (tail, rollup) + >>=? fun (ctxt, _, _) -> + (* We update the state *) + Tx_rollup_state_repr.record_commitment_deletion + state + tail + commitment.commitment_hash + >>?= fun state -> return (ctxt, state, tail) + | None -> fail No_commitment_to_remove + +let reject_commitment ctxt rollup state level = + match + Tx_rollup_state_repr.(oldest_inbox_level state, commitment_head_level state) + with + | (Some inbox_tail, Some commitment_head) -> + fail_unless + Tx_rollup_level_repr.(inbox_tail <= level && level <= commitment_head) + Invalid_rejection_level_argument + >>=? fun () -> + (* Fetching the next predecessor hash to be used *) + (match Tx_rollup_level_repr.pred level with + | Some pred_level -> + find ctxt rollup pred_level >>=? fun (ctxt, pred_commitment) -> + let pred_hash = + Option.map + (fun (x : Submitted_commitment.t) -> + Tx_rollup_commitment_repr.hash x.commitment) + pred_commitment + in + return (ctxt, pred_hash) + | None -> return (ctxt, None)) + (* We record in the state *) + >>=? fun (ctxt, pred_hash) -> + Tx_rollup_state_repr.record_commitment_rejection state level pred_hash + >>?= fun state -> return (ctxt, state) + | _ -> fail Invalid_rejection_level_argument diff --git a/src/proto_alpha/lib_protocol/tx_rollup_commitment_storage.mli b/src/proto_alpha/lib_protocol/tx_rollup_commitment_storage.mli index 65b2c252e024..0c9c3ddea7da 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_commitment_storage.mli +++ b/src/proto_alpha/lib_protocol/tx_rollup_commitment_storage.mli @@ -28,6 +28,12 @@ (** This module introduces various functions to manipulate the storage related to commitments for transaction rollups. *) +(** [check_commitment_level state commitment] fails if [commitment] + does not target the expected level. *) +val check_commitment_level : + Tx_rollup_state_repr.t -> Tx_rollup_commitment_repr.t -> unit tzresult Lwt.t +(* FIXME: move in Tx_rollup_commitment_repr *) + (** [add_commitment context tx_rollup contract commitment] adds a commitment to a rollup. @@ -46,9 +52,10 @@ val add_commitment : Raw_context.t -> Tx_rollup_repr.t -> + Tx_rollup_state_repr.t -> Signature.Public_key_hash.t -> Tx_rollup_commitment_repr.t -> - Raw_context.t tzresult Lwt.t + (Raw_context.t * Tx_rollup_state_repr.t) tzresult Lwt.t (** [remove_bond context tx_rollup contract] removes the bond for an implicit contract. This will fail if either the bond does not exist, @@ -59,38 +66,25 @@ val remove_bond : Signature.public_key_hash -> Raw_context.t tzresult Lwt.t -(** [retire_rollup_level context tx_rollup level last_level] removes all - data associated with a level. It decrements the bonded commitment count - for any contracts whose commitments have been either accepted or - obviated (that is, neither accepted nor rejected). This is normally - used in finalization (during a Commitment operation) and is only - public for testing. The [last_level] parameter is the last level - at which a commitment which should be accepted can have been submitted. - - Returns: - {ul - {li Commitment_too_late: if we have not yet reached a level where we are allowed to finalize the commitment for this level.} - {li No_commitment: if there has not yet been a commitment made for this level.} - {li Retired: if the commitment for this level has been successfully retired.} - } *) -val retire_rollup_level : +(** [find context tx_rollup level] returns the commitment + for a level, if any exists. If the rollup does not exist, + the error [Tx_rollup_does_not_exist] is returned. *) +val find : Raw_context.t -> Tx_rollup_repr.t -> - Raw_level_repr.t -> - Raw_level_repr.t -> - (Raw_context.t * [> `Commitment_too_late | `No_commitment | `Retired]) + Tx_rollup_level_repr.t -> + (Raw_context.t * Tx_rollup_commitment_repr.Submitted_commitment.t option) tzresult Lwt.t -(** [get_commitment context tx_rollup level] returns the commitment +(** [get context tx_rollup level] returns the commitment for a level, if any exists. If the rollup does not exist, the error [Tx_rollup_does_not_exist] is returned. *) -val get_commitment : +val get : Raw_context.t -> Tx_rollup_repr.t -> - Raw_level_repr.t -> - (Raw_context.t * Tx_rollup_commitment_repr.Submitted_commitment.t option) - tzresult + Tx_rollup_level_repr.t -> + (Raw_context.t * Tx_rollup_commitment_repr.Submitted_commitment.t) tzresult Lwt.t (** [pending_bonded_commitments ctxt tx_rollup contract] returns the @@ -111,16 +105,37 @@ val has_bond : Signature.public_key_hash -> (Raw_context.t * bool) tzresult Lwt.t -(** [finalize_pending_commitments ctxt tx_rollup last_level_to_finalize] - finalizes the commitment for a level, if any. If there is no - commitment for the level (or if the commitment has been - invalidated by a rejection of its predecessor), this - function is a no-op. +(** [finalize_commitment ctxt tx_rollup state] marks the commitment of + the oldest inbox as final, if the commitment exists and if it is + old enough. Otherwise, this function returns the error + [No_commitment_to_finalize]. - The state is adjusted as well, tracking which levels have been - finalized, and which are left to be finalized. *) -val finalize_pending_commitments : + The state of the rollup is adjusted accordingly, and the finalized + level is returned. Besides, the inbox at said level is removed + from the context. *) +val finalize_commitment : Raw_context.t -> Tx_rollup_repr.t -> - Raw_level_repr.t -> - Raw_context.t tzresult Lwt.t + Tx_rollup_state_repr.t -> + (Raw_context.t * Tx_rollup_state_repr.t * Tx_rollup_level_repr.t) tzresult + Lwt.t + +(** [remove_commitment ctxt tx_rollup state] tries to remove the + oldest finalized commitment from the layer-1 storage, if it + exists, and if it is old enough. Otherwise, this functions returns + the error [No_commitment_to_remove]. + + The state of the rollup is adjusted accordingly. *) +val remove_commitment : + Raw_context.t -> + Tx_rollup_repr.t -> + Tx_rollup_state_repr.t -> + (Raw_context.t * Tx_rollup_state_repr.t * Tx_rollup_level_repr.t) tzresult + Lwt.t + +val reject_commitment : + Raw_context.t -> + Tx_rollup_repr.t -> + Tx_rollup_state_repr.t -> + Tx_rollup_level_repr.t -> + (Raw_context.t * Tx_rollup_state_repr.t) tzresult Lwt.t diff --git a/src/proto_alpha/lib_protocol/tx_rollup_errors_repr.ml b/src/proto_alpha/lib_protocol/tx_rollup_errors_repr.ml new file mode 100644 index 000000000000..9f26a1533765 --- /dev/null +++ b/src/proto_alpha/lib_protocol/tx_rollup_errors_repr.ml @@ -0,0 +1,309 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2022 Marigold *) +(* Copyright (c) 2022 Nomadic Labs *) +(* Copyright (c) 2022 Oxhead Alpha *) +(* *) +(* 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. *) +(* *) +(*****************************************************************************) + +type error += + | Tx_rollup_already_exists of Tx_rollup_repr.t + | Tx_rollup_does_not_exist of Tx_rollup_repr.t + | Submit_batch_burn_excedeed of {burn : Tez_repr.t; limit : Tez_repr.t} + | Inbox_does_not_exist of Tx_rollup_repr.t * Tx_rollup_level_repr.t + | Inbox_size_would_exceed_limit of Tx_rollup_repr.t + | No_uncommitted_inbox + | Message_size_exceeds_limit + | Too_many_inboxes + | Wrong_batch_count + | Commitment_too_early of { + provided : Tx_rollup_level_repr.t; + expected : Tx_rollup_level_repr.t; + } + | Level_already_has_commitment of Tx_rollup_level_repr.t + | Wrong_inbox_hash + | Bond_does_not_exist of Signature.public_key_hash + | Bond_in_use of Signature.public_key_hash + | No_commitment_to_finalize + | No_commitment_to_remove + | Invalid_rejection_level_argument + | Commitment_does_not_exist of Tx_rollup_level_repr.t + | Wrong_predecessor_hash of { + provided : Tx_rollup_commitment_repr.Commitment_hash.t option; + expected : Tx_rollup_commitment_repr.Commitment_hash.t option; + } + | Invalid_proof + | Internal_error of string + +let () = + let open Data_encoding in + (* Tx_rollup_submit_batch_burn_excedeed *) + register_error_kind + `Temporary + ~id:"operation.tx_rollup_submit_batch_burn_excedeed" + ~title:"Submit batch excedeed burn limit" + ~description: + "The submit batch would exceed the burn limit, we withdraw the submit." + ~pp:(fun ppf (burn, limit) -> + Format.fprintf + ppf + "Cannot submit the batch of L2 operations as the cost (%a) would \ + exceed the burn limit (%a)" + Tez_repr.pp + burn + Tez_repr.pp + limit) + Data_encoding.( + obj2 (req "burn" Tez_repr.encoding) (req "limit" Tez_repr.encoding)) + (function + | Submit_batch_burn_excedeed {burn; limit} -> Some (burn, limit) + | _ -> None) + (fun (burn, limit) -> Submit_batch_burn_excedeed {burn; limit}) ; + (* Tx_rollup_inbox_does_not_exist *) + register_error_kind + `Temporary + ~id:"tx_rollup_inbox_does_not_exist" + ~title:"Missing transaction rollup inbox" + ~description:"The transaction rollup does not have an inbox at this level" + ~pp:(fun ppf (addr, level) -> + Format.fprintf + ppf + "Transaction rollup %a does not have an inbox at level %a" + Tx_rollup_repr.pp + addr + Tx_rollup_level_repr.pp + level) + (obj2 + (req "tx_rollup_address" Tx_rollup_repr.encoding) + (req "raw_level" Tx_rollup_level_repr.encoding)) + (function + | Inbox_does_not_exist (rollup, level) -> Some (rollup, level) | _ -> None) + (fun (rollup, level) -> Inbox_does_not_exist (rollup, level)) ; + register_error_kind + `Temporary + ~id:"tx_rollup_inbox_size_would_exceed_limit" + ~title:"Transaction rollup inbox’s size would exceed the limit" + ~description:"Transaction rollup inbox’s size would exceed the limit" + ~pp:(fun ppf addr -> + Format.fprintf + ppf + "Adding the submitted message would make the inbox of %a exceed the \ + authorized limit at this level" + Tx_rollup_repr.pp + addr) + (obj1 (req "tx_rollup_address" Tx_rollup_repr.encoding)) + (function Inbox_size_would_exceed_limit rollup -> Some rollup | _ -> None) + (fun rollup -> Inbox_size_would_exceed_limit rollup) ; + (* Tx_rollup_message_size_exceed_limit *) + register_error_kind + `Temporary + ~id:"tx_rollup_no_uncommitted_inbox" + ~title:"There is no inbox awaiting a commitment." + ~description:"There is no inbox awaiting a commitment." + empty + (function No_uncommitted_inbox -> Some () | _ -> None) + (fun () -> No_uncommitted_inbox) ; + (* Invalid_proof *) + register_error_kind + `Temporary + ~id:"tx_rollup_invalid_proof" + ~title:"The proof submitted for a rejection is invalid" + ~description:"The proof submitted for a rejection is invalid" + empty + (function Invalid_proof -> Some () | _ -> None) + (fun () -> Invalid_proof) ; + (* Tx_rollup_message_size_exceed_limit *) + register_error_kind + `Temporary + ~id:"tx_rollup_message_size_exceeds_limit" + ~title:"A message submtitted to a transaction rollup inbox exceeds limit" + ~description: + "A message submtitted to a transaction rollup inbox exceeds limit" + empty + (function Message_size_exceeds_limit -> Some () | _ -> None) + (fun () -> Message_size_exceeds_limit) ; + (* Tx_rollup_too_many_inboxes *) + register_error_kind + `Temporary + ~id:"tx_rollup_too_many_inboxes" + ~title:"Cannot create a new inbox because there are too many already" + ~description:"Cannot create a new inbox because there are too many already" + empty + (function Too_many_inboxes -> Some () | _ -> None) + (fun () -> Too_many_inboxes) ; + (* Wrong_batch_count *) + register_error_kind + `Temporary + ~id:"tx_rollup_wrong_batch_count" + ~title:"This commitment has the wrong number of batches" + ~description: + "This commitment has a different number of batches than its inbox" + unit + (function Wrong_batch_count -> Some () | _ -> None) + (fun () -> Wrong_batch_count) ; + (* Commitment_too_early *) + register_error_kind + `Temporary + ~id:"tx_rollup_commitment_too_early" + ~title:"Cannot submit a commitment for this level yet" + ~description: + "It is not possible to submit a commitment for this level just yet." + (obj2 + (req "provided" Tx_rollup_level_repr.encoding) + (req "expected" Tx_rollup_level_repr.encoding)) + (function + | Commitment_too_early {provided; expected} -> Some (provided, expected) + | _ -> None) + (fun (provided, expected) -> Commitment_too_early {provided; expected}) ; + (* Level_already_has_commitment *) + register_error_kind + `Temporary + ~id:"tx_rollup_level_already_has_commitment" + ~title:"This commitment is for a level that already has a commitment" + ~description:"This commitment is for a level that already has a commitment" + (obj1 (req "level" Tx_rollup_level_repr.encoding)) + (function Level_already_has_commitment level -> Some level | _ -> None) + (fun level -> Level_already_has_commitment level) ; + (* Wrong_inbox_hash *) + register_error_kind + `Branch + ~id:"Wrong_inbox_hash" + ~title:"This commitment has the wrong inbox hash" + ~description:"This commitment has a different hash than its inbox" + unit + (function Wrong_inbox_hash -> Some () | _ -> None) + (fun () -> Wrong_inbox_hash) ; + (* Bond_does_not_exist *) + register_error_kind + `Temporary + ~id:"tx_rollup_bond_does_not_exist" + ~title:"This account does not have a bond for this rollup" + ~description:"This account does not have a bond for this rollup" + (obj1 (req "contract" Signature.Public_key_hash.encoding)) + (function Bond_does_not_exist contract -> Some contract | _ -> None) + (fun contract -> Bond_does_not_exist contract) ; + (* Bond_in_use *) + register_error_kind + `Temporary + ~id:"tx_rollup_bond_in_use" + ~title:"This account's bond is in use for one or more commitments" + ~description:"This account's bond is in use for one or more commitments" + (obj1 (req "contract" Signature.Public_key_hash.encoding)) + (function Bond_in_use contract -> Some contract | _ -> None) + (fun contract -> Bond_in_use contract) ; + (* No_commitment_to_finalize *) + register_error_kind + `Temporary + ~id:"tx_rollup_no_commitment_to_finalize" + ~title:"There is no commitment to finalize" + ~description:"There is no commitment to finalize" + empty + (function No_commitment_to_finalize -> Some () | _ -> None) + (fun () -> No_commitment_to_finalize) ; + (* No_commitment_to_remove *) + register_error_kind + `Temporary + ~id:"tx_rollup_no_commitment_to_remove" + ~title:"There is no commitment to remove" + ~description:"There is no commitment to remove" + empty + (function No_commitment_to_remove -> Some () | _ -> None) + (fun () -> No_commitment_to_remove) ; + (* Invalid_rejection_level_argument *) + register_error_kind + `Temporary + ~id:"tx_rollup_invalid_rejection_level_argument" + ~title:"Received a rejection with an incorrect level argument" + ~description:"Received a rejection with an incorrect level argument" + empty + (function Invalid_rejection_level_argument -> Some () | _ -> None) + (fun () -> Invalid_rejection_level_argument) ; + (* Commitment_does_not_exist *) + register_error_kind + `Temporary + ~id:"tx_rollup_commitment_does_not_exist" + ~title:"There is no commitment at the requested level" + ~description:"There is no commitment at the requested level" + (obj1 (req "provided" Tx_rollup_level_repr.encoding)) + (function Commitment_does_not_exist l -> Some l | _ -> None) + (fun l -> Commitment_does_not_exist l) ; + (* Wrong_predecessor_hash *) + register_error_kind + `Temporary + ~id:"tx_rollup_wrong_predecessor_hash" + ~title:"The commitment refers to a commitment that is not in the context" + ~description: + "The commitment refers to a commitment that is not in the context" + (obj2 + (req + "provided" + (option Tx_rollup_commitment_repr.Commitment_hash.encoding)) + (req + "expected" + (option Tx_rollup_commitment_repr.Commitment_hash.encoding))) + (function + | Wrong_predecessor_hash {provided; expected} -> Some (provided, expected) + | _ -> None) + (fun (provided, expected) -> Wrong_predecessor_hash {provided; expected}) ; + (* Tx_rollup_already_exists *) + register_error_kind + `Permanent + ~id:"tx_rollup_already_exists" + ~title:"Transaction rollup was already created" + ~description: + "The protocol tried to originate the same transaction rollup twice" + ~pp:(fun ppf addr -> + Format.fprintf + ppf + "Transaction rollup %a is already used for an existing transaction \ + rollup. This should not happen, and indicates there is a bug in the \ + protocol. If you can, please report this bug \ + (https://gitlab.com/tezos/tezos/-/issues.)" + Tx_rollup_repr.pp + addr) + (obj1 (req "rollup_address" Tx_rollup_repr.encoding)) + (function Tx_rollup_already_exists rollup -> Some rollup | _ -> None) + (fun rollup -> Tx_rollup_already_exists rollup) ; + (* Tx_rollup_does_not_exist *) + register_error_kind + `Temporary + ~id:"tx_rollup_does_not_exist" + ~title:"Transaction rollup does not exist" + ~description:"An invalid transaction rollup address was submitted" + ~pp:(fun ppf addr -> + Format.fprintf + ppf + "Invalid transaction rollup address %a" + Tx_rollup_repr.pp + addr) + (obj1 (req "rollup_address" Tx_rollup_repr.encoding)) + (function Tx_rollup_does_not_exist rollup -> Some rollup | _ -> None) + (fun rollup -> Tx_rollup_does_not_exist rollup) ; + (* Internal_error *) + register_error_kind + `Permanent + ~id:"tx_rollup_internal_error" + ~title:"An internal error occurred" + ~description:"An internal error occurred" + (obj1 (req "description" string)) + (function Internal_error str -> Some str | _ -> None) + (fun str -> Internal_error str) diff --git a/src/proto_alpha/lib_protocol/tx_rollup_inbox_repr.ml b/src/proto_alpha/lib_protocol/tx_rollup_inbox_repr.ml index 1464fccd1aad..0079811f0da2 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_inbox_repr.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_inbox_repr.ml @@ -106,33 +106,23 @@ let encoding = (req "cumulated_size" int31) (req "hash" hash_encoding)) -type metadata = { - inbox_length : int32; - cumulated_size : int; - hash : hash; - predecessor : Raw_level_repr.t option; - successor : Raw_level_repr.t option; -} +type metadata = {inbox_length : int32; cumulated_size : int; hash : hash} let metadata_encoding = let open Data_encoding in conv - (fun {inbox_length; cumulated_size; predecessor; successor; hash} -> - (inbox_length, cumulated_size, predecessor, successor, hash)) - (fun (inbox_length, cumulated_size, predecessor, successor, hash) -> - {inbox_length; cumulated_size; predecessor; successor; hash}) - (obj5 + (fun {inbox_length; cumulated_size; hash} -> + (inbox_length, cumulated_size, hash)) + (fun (inbox_length, cumulated_size, hash) -> + {inbox_length; cumulated_size; hash}) + (obj3 (req "inbox_length" int32) (req "cumulated_size" int31) - (req "predecessor" (option Raw_level_repr.encoding)) - (req "successor" (option Raw_level_repr.encoding)) (req "hash" hash_encoding)) -let empty_metadata predecessor = +let empty_metadata = { inbox_length = 0l; cumulated_size = 0; - predecessor; - successor = None; hash = Inbox_hash.hash_bytes [Bytes.make hash_size @@ Char.chr 0]; } diff --git a/src/proto_alpha/lib_protocol/tx_rollup_inbox_repr.mli b/src/proto_alpha/lib_protocol/tx_rollup_inbox_repr.mli index 1c5a62f17cb0..669bcc11be7b 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_inbox_repr.mli +++ b/src/proto_alpha/lib_protocol/tx_rollup_inbox_repr.mli @@ -86,20 +86,12 @@ val pp : Format.formatter -> t -> unit val encoding : t Data_encoding.t -(* The metadata for an inbox stores the [cumulated_size] in bytes for - the inbox, the [inbox_length] ({i i.e.}, the number of messages), - the [predecessor] level, the [successor] level, and the cumulative - hash of the inbox contents. For all inboxes, the [successor] will - be [None] until a subsequent inbox is created. For newly created - inboxes, the [hash] is initialized as an array 32 null byte. *) -type metadata = { - inbox_length : int32; - cumulated_size : int; - hash : hash; - predecessor : Raw_level_repr.t option; - successor : Raw_level_repr.t option; -} +(** The metadata for an inbox stores the [cumulated_size] in bytes for + the inbox, the [inbox_length] ({i i.e.}, the number of messages), + and the cumulative [hash] of the inbox contents. For newly created + inboxes, the [hash] is initialized as an array 32 null byte. *) +type metadata = {inbox_length : int32; cumulated_size : int; hash : hash} val metadata_encoding : metadata Data_encoding.t -val empty_metadata : Raw_level_repr.t option -> metadata +val empty_metadata : metadata diff --git a/src/proto_alpha/lib_protocol/tx_rollup_inbox_storage.ml b/src/proto_alpha/lib_protocol/tx_rollup_inbox_storage.ml index 791ab8d90374..d416f7470a88 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_inbox_storage.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_inbox_storage.ml @@ -25,79 +25,46 @@ (* *) (*****************************************************************************) -type error += - | Tx_rollup_inbox_does_not_exist of Tx_rollup_repr.t * Raw_level_repr.t - | Tx_rollup_inbox_size_would_exceed_limit of Tx_rollup_repr.t - | Tx_rollup_message_size_exceeds_limit +open Tx_rollup_errors_repr -(** [prepare_metadata ctxt rollup state level] prepares the metadata for - an inbox at [level]. This may involve updating the predecessor's - successor pointer. It also returns a new state which point - the tail of the linked list of inboxes to this inbox. *) +(** [prepare_metadata ctxt rollup state level] prepares the metadata + for an inbox at [level], which may imply creating it if it does + not already exist. *) let prepare_metadata : Raw_context.t -> Tx_rollup_repr.t -> Tx_rollup_state_repr.t -> Raw_level_repr.t -> - (Raw_context.t * Tx_rollup_state_repr.t * Tx_rollup_inbox_repr.metadata) + (Raw_context.t + * Tx_rollup_state_repr.t + * Tx_rollup_level_repr.t + * Tx_rollup_inbox_repr.metadata) tzresult Lwt.t = fun ctxt rollup state level -> - (* First, check if there are too many unfinalized levels. *) + (* First, check if there are too many inboxes *) fail_when Compare.Int.( - Tx_rollup_state_repr.unfinalized_level_count state - > Constants_storage.tx_rollup_max_unfinalized_levels ctxt) - Tx_rollup_commitment_repr.Too_many_unfinalized_levels + Constants_storage.tx_rollup_max_unfinalized_levels ctxt + <= Tx_rollup_state_repr.inboxes_count state) + Too_many_inboxes >>=? fun () -> - (* Consume a fix amount of gas. *) - (* TODO/TORU: https://gitlab.com/tezos/tezos/-/issues/2340 - Extract the constant in a dedicated [Tx_rollup_cost] module, and - refine it if need be. *) - Raw_context.consume_gas - ctxt - Gas_limit_repr.(cost_of_gas @@ Arith.integral_of_int_exn 200) - >>?= fun ctxt -> - (* Opt-out gas accounting *) - let save_gas_level = Raw_context.gas_level ctxt in - let ctxt = Raw_context.set_gas_unlimited ctxt in - (* Processing *) - Storage.Tx_rollup.Inbox_metadata.find (ctxt, level) rollup - >>=? fun (ctxt, metadata) -> - (match metadata with - | Some metadata -> return (ctxt, state, metadata) - | None -> - (* First message in inbox: need to update linked list and pending - inbox count *) - let predecessor = Tx_rollup_state_repr.last_inbox_level state in - let new_state = Tx_rollup_state_repr.append_inbox state level in - Tx_rollup_state_storage.update ctxt rollup new_state >>=? fun ctxt -> - (match predecessor with - | None -> return ctxt - | Some predecessor_level -> - Storage.Tx_rollup.Inbox_metadata.get (ctxt, predecessor_level) rollup - >>=? fun (ctxt, predecessor_metadata) -> - (* Here, we update the predecessor inbox's successor to point - to this inbox. *) - Storage.Tx_rollup.Inbox_metadata.add - (ctxt, predecessor_level) - rollup - {predecessor_metadata with successor = Some level} - >|=? fun (ctxt, _, _) -> ctxt) - >>=? fun ctxt -> - let new_metadata : Tx_rollup_inbox_repr.metadata = - Tx_rollup_inbox_repr.empty_metadata predecessor - in - return (ctxt, new_state, new_metadata)) - >>=? fun (ctxt, new_state, new_metadata) -> - (* Restore gas accounting. *) - let ctxt = - match save_gas_level with - | Gas_limit_repr.Unaccounted -> ctxt - | Gas_limit_repr.Limited {remaining = limit} -> - Raw_context.set_gas_limit ctxt limit - in - return (ctxt, new_state, new_metadata) + match Tx_rollup_state_repr.head_level state with + | Some (_, tezos_lvl) when Raw_level_repr.(level < tezos_lvl) -> + fail (Internal_error "Trying to write into an inbox from the past") + | Some (tx_lvl, tezos_lvl) when Raw_level_repr.(tezos_lvl = level) -> + (* An inbox should already exists *) + Storage.Tx_rollup.Inbox_metadata.get (ctxt, tx_lvl) rollup + >>=? fun (ctxt, metadata) -> return (ctxt, state, tx_lvl, metadata) + | _ -> + (* We need a new inbox *) + Tx_rollup_state_repr.record_inbox_creation state level + >>?= fun (state, tx_level) -> + let metadata = Tx_rollup_inbox_repr.empty_metadata in + Storage.Tx_rollup.Inbox_metadata.init (ctxt, tx_level) rollup metadata + >>=? fun (ctxt, _) -> + let ctxt = Raw_context.record_tx_rollup ctxt rollup in + return (ctxt, state, tx_level, metadata) (** [update_metadata metadata msg_size] updates [metadata] to account for a new message of [msg_size] bytes. *) @@ -109,12 +76,12 @@ let update_metadata : fun metadata msg_hash msg_size -> let hash = Tx_rollup_inbox_repr.extend_hash metadata.hash msg_hash in ok - { - metadata with - inbox_length = Int32.succ metadata.inbox_length; - cumulated_size = msg_size + metadata.cumulated_size; - hash; - } + Tx_rollup_inbox_repr. + { + inbox_length = Int32.succ metadata.inbox_length; + cumulated_size = msg_size + metadata.cumulated_size; + hash; + } let append_message : Raw_context.t -> @@ -126,39 +93,32 @@ let append_message : let level = (Raw_context.current_level ctxt).level in let message_size = Tx_rollup_message_repr.size message in prepare_metadata ctxt rollup state level - >>=? fun (ctxt, new_state, metadata) -> + >>=? fun (ctxt, new_state, tx_level, metadata) -> Tx_rollup_message_builder.hash ctxt message >>?= fun (ctxt, message_hash) -> update_metadata metadata message_hash message_size >>?= fun new_metadata -> - Storage.Tx_rollup.Inbox_metadata.add (ctxt, level) rollup new_metadata - >>=? fun (ctxt, _, _) -> let new_size = new_metadata.cumulated_size in let inbox_limit = Constants_storage.tx_rollup_hard_size_limit_per_inbox ctxt in fail_unless Compare.Int.(new_size <= inbox_limit) - (Tx_rollup_inbox_size_would_exceed_limit rollup) + (Inbox_size_would_exceed_limit rollup) >>=? fun () -> + (* Checks have passed, so we can actually record in the storage. *) + Storage.Tx_rollup.Inbox_metadata.add (ctxt, tx_level) rollup new_metadata + >>=? fun (ctxt, _, _) -> Storage.Tx_rollup.Inbox_contents.add - ((ctxt, level), rollup) + ((ctxt, tx_level), rollup) metadata.inbox_length message_hash >>=? fun (ctxt, _, _) -> return (ctxt, new_state) -let get_level : - Raw_context.t -> [`Current | `Level of Raw_level_repr.t] -> Raw_level_repr.t - = - fun ctxt -> function - | `Current -> (Raw_context.current_level ctxt).level - | `Level lvl -> lvl - let messages_opt : Raw_context.t -> - level:[`Current | `Level of Raw_level_repr.t] -> + Tx_rollup_level_repr.t -> Tx_rollup_repr.t -> (Raw_context.t * Tx_rollup_message_repr.hash list option) tzresult Lwt.t = - fun ctxt ~level tx_rollup -> - let level = get_level ctxt level in + fun ctxt level tx_rollup -> Storage.Tx_rollup.Inbox_contents.list_values ((ctxt, level), tx_rollup) >>=? function | (ctxt, []) -> @@ -173,22 +133,21 @@ let messages_opt : let messages : Raw_context.t -> - level:[`Current | `Level of Raw_level_repr.t] -> + Tx_rollup_level_repr.t -> Tx_rollup_repr.t -> (Raw_context.t * Tx_rollup_message_repr.hash list) tzresult Lwt.t = - fun ctxt ~level tx_rollup -> - messages_opt ctxt ~level tx_rollup >>=? function + fun ctxt level tx_rollup -> + messages_opt ctxt level tx_rollup >>=? function | (ctxt, Some messages) -> return (ctxt, messages) | (_, None) -> - fail (Tx_rollup_inbox_does_not_exist (tx_rollup, get_level ctxt level)) + fail (Tx_rollup_errors_repr.Inbox_does_not_exist (tx_rollup, level)) let size : Raw_context.t -> - level:[`Current | `Level of Raw_level_repr.t] -> + Tx_rollup_level_repr.t -> Tx_rollup_repr.t -> (Raw_context.t * int) tzresult Lwt.t = - fun ctxt ~level tx_rollup -> - let level = get_level ctxt level in + fun ctxt level tx_rollup -> Storage.Tx_rollup.Inbox_metadata.find (ctxt, level) tx_rollup >>=? function | (ctxt, Some {cumulated_size; _}) -> return (ctxt, cumulated_size) | (ctxt, None) -> @@ -198,112 +157,62 @@ let size : to raise the appropriate if need be. *) Tx_rollup_state_storage.assert_exist ctxt tx_rollup >>=? fun _ctxt -> - fail (Tx_rollup_inbox_does_not_exist (tx_rollup, level)) + fail (Inbox_does_not_exist (tx_rollup, level)) let find : Raw_context.t -> - level:[`Current | `Level of Raw_level_repr.t] -> + Tx_rollup_level_repr.t -> Tx_rollup_repr.t -> (Raw_context.t * Tx_rollup_inbox_repr.t option) tzresult Lwt.t = - fun ctxt ~level tx_rollup -> + fun ctxt level tx_rollup -> let open Tx_rollup_inbox_repr in (* [messages_opt] checks whether or not [tx_rollup] is valid, so we do not have to do it here. *) - messages_opt ctxt ~level tx_rollup >>=? function + messages_opt ctxt level tx_rollup >>=? function | (ctxt, Some contents) -> - size ctxt ~level tx_rollup >>=? fun (ctxt, cumulated_size) -> + size ctxt level tx_rollup >>=? fun (ctxt, cumulated_size) -> let hash = Tx_rollup_inbox_repr.hash_hashed_inbox contents in return (ctxt, Some {cumulated_size; contents; hash}) | (ctxt, None) -> return (ctxt, None) let get : Raw_context.t -> - level:[`Current | `Level of Raw_level_repr.t] -> + Tx_rollup_level_repr.t -> Tx_rollup_repr.t -> (Raw_context.t * Tx_rollup_inbox_repr.t) tzresult Lwt.t = - fun ctxt ~level tx_rollup -> + fun ctxt level tx_rollup -> (* [inbox_opt] checks whether or not [tx_rollup] is valid, so we don’t have to do it here. *) - find ctxt ~level tx_rollup >>=? function + find ctxt level tx_rollup >>=? function | (ctxt, Some res) -> return (ctxt, res) - | (_, None) -> - fail (Tx_rollup_inbox_does_not_exist (tx_rollup, get_level ctxt level)) - -let get_adjacent_levels : - Raw_context.t -> - Raw_level_repr.t -> - Tx_rollup_repr.t -> - (Raw_context.t * Raw_level_repr.t option * Raw_level_repr.t option) tzresult - Lwt.t = - fun ctxt level tx_rollup -> - Storage.Tx_rollup.Inbox_metadata.find (ctxt, level) tx_rollup >>=? function - | (ctxt, Some {predecessor; successor; _}) -> - return (ctxt, predecessor, successor) - | (_, None) -> fail @@ Tx_rollup_inbox_does_not_exist (tx_rollup, level) + | (_, None) -> fail (Inbox_does_not_exist (tx_rollup, level)) let get_metadata : Raw_context.t -> - Raw_level_repr.t -> + Tx_rollup_level_repr.t -> Tx_rollup_repr.t -> (Raw_context.t * Tx_rollup_inbox_repr.metadata) tzresult Lwt.t = fun ctxt level tx_rollup -> Storage.Tx_rollup.Inbox_metadata.find (ctxt, level) tx_rollup >>=? function - | (_, None) -> fail (Tx_rollup_inbox_does_not_exist (tx_rollup, level)) + | (_, None) -> fail (Inbox_does_not_exist (tx_rollup, level)) | (ctxt, Some metadata) -> return (ctxt, metadata) -(* Error registration *) - -let () = - let open Data_encoding in - (* Tx_rollup_inbox_does_not_exist *) - register_error_kind - `Permanent - ~id:"tx_rollup_inbox_does_not_exist" - ~title:"Missing transaction rollup inbox" - ~description:"The transaction rollup does not have an inbox at this level" - ~pp:(fun ppf (addr, level) -> - Format.fprintf - ppf - "Transaction rollup %a does not have an inbox at level %a" - Tx_rollup_repr.pp - addr - Raw_level_repr.pp - level) - (obj2 - (req "tx_rollup_address" Tx_rollup_repr.encoding) - (req "raw_level" Raw_level_repr.encoding)) - (function - | Tx_rollup_inbox_does_not_exist (rollup, level) -> Some (rollup, level) - | _ -> None) - (fun (rollup, level) -> Tx_rollup_inbox_does_not_exist (rollup, level)) ; - register_error_kind - `Permanent - ~id:"tx_rollup_inbox_size_would_exceed_limit" - ~title:"Transaction rollup inbox’s size would exceed the limit" - ~description:"Transaction rollup inbox’s size would exceed the limit" - ~pp:(fun ppf addr -> - Format.fprintf - ppf - "Adding the submitted message would make the inbox of %a exceed the \ - authorized limit at this level" - Tx_rollup_repr.pp - addr) - (obj1 (req "tx_rollup_address" Tx_rollup_repr.encoding)) - (function - | Tx_rollup_inbox_size_would_exceed_limit rollup -> Some rollup - | _ -> None) - (fun rollup -> Tx_rollup_inbox_size_would_exceed_limit rollup) ; - (* Tx_rollup_message_size_exceed_limit *) - register_error_kind - `Permanent - ~id:"tx_rollup_message_size_exceeds_limit" - ~title:"A message submtitted to a transaction rollup inbox exceeds limit" - ~description: - "A message submtitted to a transaction rollup inbox exceeds limit" - empty - (function Tx_rollup_message_size_exceeds_limit -> Some () | _ -> None) - (fun () -> Tx_rollup_message_size_exceeds_limit) +let remove : + Raw_context.t -> + Tx_rollup_level_repr.t -> + Tx_rollup_repr.t -> + Raw_context.t tzresult Lwt.t = + fun ctxt level rollup -> + let rec remove_messages ctxt i len = + if Compare.Int32.(i < len) then + Storage.Tx_rollup.Inbox_contents.remove ((ctxt, level), rollup) i + >>=? fun (ctxt, _, _) -> remove_messages ctxt (Int32.succ i) len + else return ctxt + in + get_metadata ctxt level rollup >>=? fun (ctxt, metadata) -> + Storage.Tx_rollup.Inbox_metadata.remove (ctxt, level) rollup + >>=? fun (ctxt, _, _) -> remove_messages ctxt 0l metadata.inbox_length diff --git a/src/proto_alpha/lib_protocol/tx_rollup_inbox_storage.mli b/src/proto_alpha/lib_protocol/tx_rollup_inbox_storage.mli index e319cb1d97d9..c7e46b51fdf8 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_inbox_storage.mli +++ b/src/proto_alpha/lib_protocol/tx_rollup_inbox_storage.mli @@ -30,14 +30,9 @@ Except explicit mention of the contrary, all the functions of this module are carbonated. *) -type error += - | Tx_rollup_inbox_does_not_exist of Tx_rollup_repr.t * Raw_level_repr.t - | Tx_rollup_inbox_size_would_exceed_limit of Tx_rollup_repr.t - | Tx_rollup_message_size_exceeds_limit - (** [append_message ctxt tx_rollup state message] tries to append [message] to the inbox of [tx_rollup] at the current level, creating - it in theprocess if need be. This function returns the size of the + it in the process if need be. This function returns the size of the appended message (in bytes), in order for the appropriate burn to be taken from the message author, as well as the new state. It is the caller's responsibility to store the returned state. @@ -47,14 +42,13 @@ type error += Returns the error - {ul {li [Tx_rollup_hard_size_limit_reached] if appending [message] - to the inbox would make it exceed the maximum size - specified by the [tx_rollup_hard_size_limit_per_inbox] - protocol parameter.} - {li [Tx_rollup_message_size_exceeds_limit] if the size of - [message] is greater than the - [tx_rollup_hard_size_limit_per_message] protocol - parameter.}} *) + {ul {li [Inbox_size_would_exceed_limit] if appending [message] to + the inbox would make it exceed the maximum size specified + by the [tx_rollup_hard_size_limit_per_inbox] protocol + parameter.} + {li [Message_size_exceeds_limit] if the size of [message] is + greater than the [tx_rollup_hard_size_limit_per_message] + protocol parameter.}} *) val append_message : Raw_context.t -> Tx_rollup_repr.t -> @@ -62,87 +56,76 @@ val append_message : Tx_rollup_message_repr.t -> (Raw_context.t * Tx_rollup_state_repr.t) tzresult Lwt.t -(** [messages ctxt ~level tx_rollup] returns the list of messages +(** [messages ctxt level tx_rollup] returns the list of messages hashes stored in the inbox of [tx_rollup] at level [level]. - If the [level] label is omitted, then it is inferred from [ctxt] - (namely, from the current level of the chain). - Returns the errors {ul {li [Tx_rollup_does_not_exist] iff [tx_rollup] does not exist} - {li [Tx_rollup_inbox_does_not_exist] iff [tx_rollup] exists, - but does not have an inbox at level [level]. }} *) + {li [Inbox_does_not_exist] iff [tx_rollup] exists, but does + not have an inbox at level [level]. }} *) val messages : Raw_context.t -> - level:[`Current | `Level of Raw_level_repr.t] -> + Tx_rollup_level_repr.t -> Tx_rollup_repr.t -> (Raw_context.t * Tx_rollup_message_repr.hash list) tzresult Lwt.t -(** [size ctxt ~level tx_rollup] returns the number of bytes allocated +(** [size ctxt level tx_rollup] returns the number of bytes allocated by the messages of the inbox of [tx_rollup] at level [level]. - If the [level] label is omitted, then it is inferred from [ctxt] - (namely, from the current level of the chain). - Returns the errors {ul {li [Tx_rollup_does_not_exist] iff [tx_rollup] does not exist} - {li [Tx_rollup_inbox_does_not_exist] iff [tx_rollup] exists, - but does not have an inbox at level [level]. }} *) + {li [Inbox_does_not_exist] iff [tx_rollup] exists, but does + not have an inbox at level [level]. }} *) val size : Raw_context.t -> - level:[`Current | `Level of Raw_level_repr.t] -> + Tx_rollup_level_repr.t -> Tx_rollup_repr.t -> (Raw_context.t * int) tzresult Lwt.t -(** [get ctxt ~level tx_rollup] returns the inbox of [tx_rollup] at +(** [get ctxt level tx_rollup] returns the inbox of [tx_rollup] at level [level]. - If the [level] label is omitted, then it is inferred from [ctxt] - (namely, from the current level of the chain). - Returns the errors {ul {li [Tx_rollup_does_not_exist] iff [tx_rollup] does not exist} - {li [Tx_rollup_inbox_does_not_exist] iff [tx_rollup] exists, - but does not have an inbox at level [level]. }} *) + {li [Inbox_does_not_exist] iff [tx_rollup] exists, but does + not have an inbox at level [level]. }} *) val get : Raw_context.t -> - level:[`Current | `Level of Raw_level_repr.t] -> + Tx_rollup_level_repr.t -> Tx_rollup_repr.t -> (Raw_context.t * Tx_rollup_inbox_repr.t) tzresult Lwt.t -(** [find ctxt ~level tx_rollup] returns the inbox of [tx_rollup] at - level [level], or [None] if said inbox does not exists. - - If the [level] label is omitted, then it is inferred from [ctxt] - (namely, from the current level of the chain). +(** [find ctxt level tx_rollup] returns the inbox of [tx_rollup] at + level [level], or [None] if said inbox does not exist. Returns the [Tx_rollup_does_not_exist] error iff [tx_rollup] does not exist. *) val find : Raw_context.t -> - level:[`Current | `Level of Raw_level_repr.t] -> + Tx_rollup_level_repr.t -> Tx_rollup_repr.t -> (Raw_context.t * Tx_rollup_inbox_repr.t option) tzresult Lwt.t -(** [get_adjacent_levels ctxt level tx_rollup] returns the first level - before [level] that has a non-empty inbox, if any, and the first - level after [level] that has a non-empty inbox, if any. It is - assumed that [level] itself has a non-empty inbox, and if it does - not, or if [tx_rollup] does not exist, the result is an error. *) -val get_adjacent_levels : +(** [get_metadata ctxt level tx_rollup] returns the metadata for an inbox: + its count, byte size, next and previous levels, and hash. *) +val get_metadata : Raw_context.t -> - Raw_level_repr.t -> + Tx_rollup_level_repr.t -> Tx_rollup_repr.t -> - (Raw_context.t * Raw_level_repr.t option * Raw_level_repr.t option) tzresult - Lwt.t + (Raw_context.t * Tx_rollup_inbox_repr.metadata) tzresult Lwt.t -(* [get_metadata ctxt level tx_rollup] returns the metadata for an inbox: - its count, byte size, next and previous levels, and hash *) -val get_metadata : +(** [remove ctxt level tx_rollup] removes from the context the + metadata and the contents of the inbox of [level]. + + This functions will returns the error [Inbox_does_not_exist] if + there is no inbox for [level] in the storage. It is the + reponsibility of the caller to ensure the [tx_rollup] actually + exists. *) +val remove : Raw_context.t -> - Raw_level_repr.t -> + Tx_rollup_level_repr.t -> Tx_rollup_repr.t -> - (Raw_context.t * Tx_rollup_inbox_repr.metadata) tzresult Lwt.t + Raw_context.t tzresult Lwt.t diff --git a/src/proto_alpha/lib_protocol/tx_rollup_level_repr.ml b/src/proto_alpha/lib_protocol/tx_rollup_level_repr.ml new file mode 100644 index 000000000000..d5f43d1e8d6f --- /dev/null +++ b/src/proto_alpha/lib_protocol/tx_rollup_level_repr.ml @@ -0,0 +1,30 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2022 Marigold *) +(* Copyright (c) 2022 Nomadic Labs *) +(* Copyright (c) 2022 Oxhead Alpha *) +(* *) +(* 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. *) +(* *) +(*****************************************************************************) + +include Raw_level_repr + +type level = t diff --git a/src/proto_alpha/lib_protocol/tx_rollup_level_repr.mli b/src/proto_alpha/lib_protocol/tx_rollup_level_repr.mli new file mode 100644 index 000000000000..b1ad65ce3d50 --- /dev/null +++ b/src/proto_alpha/lib_protocol/tx_rollup_level_repr.mli @@ -0,0 +1,62 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2022 Marigold *) +(* Copyright (c) 2022 Nomadic Labs *) +(* Copyright (c) 2022 Oxhead Alpha *) +(* *) +(* 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. *) +(* *) +(*****************************************************************************) +type t + +type level = t + +(** @raise Invalid_argument when the level to encode is not positive *) +val encoding : level Data_encoding.t + +val rpc_arg : level RPC_arg.arg + +val pp : Format.formatter -> level -> unit + +include Compare.S with type t := level + +val to_int32 : level -> int32 + +(** @raise Invalid_argument when the level to encode is negative *) +val of_int32_exn : int32 -> level + +(** Can trigger Unexpected_level error when the level to encode is negative *) +val of_int32 : int32 -> level tzresult + +val diff : level -> level -> int32 + +val root : level + +val succ : level -> level + +val pred : level -> level option + +(** [add l i] i must be positive *) +val add : level -> int -> level + +(** [sub l i] i must be positive *) +val sub : level -> int -> level option + +module Index : Storage_description.INDEX with type t = level diff --git a/src/proto_alpha/lib_protocol/tx_rollup_repr.ml b/src/proto_alpha/lib_protocol/tx_rollup_repr.ml index 468bf8e9a78e..0ef188dce62a 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_repr.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_repr.ml @@ -69,12 +69,14 @@ type t = Hash.t type tx_rollup = t -include Compare.Make (struct +module Compare_impl = Compare.Make (struct type nonrec t = t let compare r1 r2 = Hash.compare r1 r2 end) +include Compare_impl + let in_memory_size _ = let open Cache_memory_helpers in header_size +! word_size +! string_size_gen hash_size @@ -161,3 +163,9 @@ type deposit_parameters = { amount : Tx_rollup_l2_qty.t; destination : Tx_rollup_l2_address.Indexable.value; } + +module Set = Set.Make (struct + type t = tx_rollup + + include Compare_impl +end) diff --git a/src/proto_alpha/lib_protocol/tx_rollup_repr.mli b/src/proto_alpha/lib_protocol/tx_rollup_repr.mli index 699f60aa4592..b7c4d615b277 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_repr.mli +++ b/src/proto_alpha/lib_protocol/tx_rollup_repr.mli @@ -93,3 +93,5 @@ type deposit_parameters = { amount : Tx_rollup_l2_qty.t; destination : Tx_rollup_l2_address.Indexable.value; } + +module Set : Set.S with type elt = tx_rollup diff --git a/src/proto_alpha/lib_protocol/tx_rollup_services.ml b/src/proto_alpha/lib_protocol/tx_rollup_services.ml index 1d67a268af13..f1e1f289f47e 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_services.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_services.ml @@ -42,22 +42,19 @@ module S = struct ~description:"Get the inbox of a transaction rollup" ~query:RPC_query.empty ~output:Tx_rollup_inbox.encoding - RPC_path.(custom_root /: Tx_rollup.rpc_arg / "inbox") - - let commitment_query = - let open RPC_query in - query (fun offset -> offset) - |+ opt_field ~descr:"offset" "offset" RPC_arg.int (fun t -> t) - |> seal + RPC_path.( + custom_root /: Tx_rollup.rpc_arg / "inbox" /: Tx_rollup_level.rpc_arg) let commitment = RPC_service.get_service ~description:"Return the commitment for a level, if any" - ~query:commitment_query + ~query:RPC_query.empty ~output: - (Data_encoding.option - Tx_rollup_commitment.Submitted_commitment.encoding) - RPC_path.(custom_root /: Tx_rollup.rpc_arg / "commitment") + Data_encoding.( + option Tx_rollup_commitment.Submitted_commitment.encoding) + RPC_path.( + custom_root /: Tx_rollup.rpc_arg / "commitment" + /: Tx_rollup_level.rpc_arg) let pending_bonded_commitments = RPC_service.get_service @@ -74,21 +71,11 @@ let register () = let open Services_registration in opt_register1 ~chunked:false S.state (fun ctxt tx_rollup () () -> Tx_rollup_state.find ctxt tx_rollup >|=? snd) ; - opt_register1 ~chunked:false S.inbox (fun ctxt tx_rollup () () -> - Tx_rollup_inbox.find ctxt tx_rollup ~level:`Current >|=? snd) ; - register1 ~chunked:false S.commitment (fun ctxt tx_rollup offset () -> - let level = - match offset with - | None -> Level.current ctxt - | Some offset -> ( - if Compare.Int.(offset < 0) then - failwith "offset should not be negative." ; - match Level.sub ctxt (Level.current ctxt) offset with - | None -> - failwith "the offset is not valid: The block level is negative." - | Some level -> level) - in - Tx_rollup_commitment.get_commitment ctxt tx_rollup level.level >|=? snd) ; + opt_register2 ~chunked:false S.inbox (fun ctxt tx_rollup level () () -> + Tx_rollup_inbox.find ctxt level tx_rollup >|=? snd) ; + register2 ~chunked:false S.commitment (fun ctxt tx_rollup level () () -> + Tx_rollup_commitment.find ctxt tx_rollup level >|=? fun (_, commitment) -> + commitment) ; register2 ~chunked:false S.pending_bonded_commitments @@ -99,8 +86,8 @@ let register () = let state ctxt block tx_rollup = RPC_context.make_call1 S.state ctxt block tx_rollup () () -let inbox ctxt block tx_rollup = - RPC_context.make_call1 S.inbox ctxt block tx_rollup () () +let inbox ctxt block tx_rollup level = + RPC_context.make_call2 S.inbox ctxt block tx_rollup level () () -let commitment ctxt block ?offset tx_rollup = - RPC_context.make_call1 S.commitment ctxt block tx_rollup offset () +let commitment ctxt block tx_rollup level = + RPC_context.make_call2 S.commitment ctxt block tx_rollup level () () diff --git a/src/proto_alpha/lib_protocol/tx_rollup_services.mli b/src/proto_alpha/lib_protocol/tx_rollup_services.mli index d62fac661b17..f9f4dea9bca5 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_services.mli +++ b/src/proto_alpha/lib_protocol/tx_rollup_services.mli @@ -32,7 +32,8 @@ val state : Tx_rollup.t -> Tx_rollup_state.t shell_tzresult Lwt.t -(** Returns the inbox for a transaction rollup for current level. +(** Returns the inbox for a transaction rollup for a given rollup + level. Returns [Not_found] if the transaction rollup exists, but does not have inbox at that level. Fails if the transaction rollup does not @@ -41,13 +42,14 @@ val inbox : 'a #RPC_context.simple -> 'a -> Tx_rollup.t -> + Tx_rollup_level.t -> Tx_rollup_inbox.t shell_tzresult Lwt.t val commitment : 'a #RPC_context.simple -> 'a -> - ?offset:int -> Tx_rollup.t -> + Tx_rollup_level.t -> Tx_rollup_commitment.Submitted_commitment.t option shell_tzresult Lwt.t val register : unit -> unit diff --git a/src/proto_alpha/lib_protocol/tx_rollup_state_repr.ml b/src/proto_alpha/lib_protocol/tx_rollup_state_repr.ml index 9150f68b9040..e21a8c6ce691 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_state_repr.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_state_repr.ml @@ -25,11 +25,7 @@ (* *) (*****************************************************************************) -type error += - | Tx_rollup_submit_batch_burn_excedeed of { - burn : Tez_repr.t; - limit : Tez_repr.t; - } +open Tx_rollup_errors_repr (** The state of a transaction rollup is composed of [burn_per_byte] and [inbox_ema] fields. [initial_state] introduces their initial @@ -48,76 +44,210 @@ type error += spurious spikes of [burn_per_byte]. *) type t = { - first_unfinalized_level : Raw_level_repr.t option; - unfinalized_level_count : int; + last_removed_commitment_hash : + Tx_rollup_commitment_repr.Commitment_hash.t option; + commitment_tail_level : Tx_rollup_level_repr.t option; + oldest_inbox_level : Tx_rollup_level_repr.t option; + commitment_head_level : + (Tx_rollup_level_repr.t * Tx_rollup_commitment_repr.Commitment_hash.t) + option; + head_level : (Tx_rollup_level_repr.t * Raw_level_repr.t) option; burn_per_byte : Tez_repr.t; inbox_ema : int; - last_inbox_level : Raw_level_repr.t option; } +(* + + The main use of a transaction rollup state is to keep track of four + pointers to four different rollup levels. + + - The [commitment_tail_level] is the level of the oldest + finalized commitment still in the layer-1 storage. + + - The [commitment_head_level] is the level of the most recent + unfinalized commitment in the layer-1 storage. + + - The [oldest_inbox_level] is the level of the oldest inbox still + in the layer-1 storage. + + - The [head_level] is the level of the most recent inbox in the + layer-1 storage. + + When the rollup is created, these four pointers are initialized with + the [None] value, because no inboxes or commitments have been created + yet. Because inboxes and commitments can be removed from the layer-1 + context under certain circumstances, they can be reset to [None]. + + Given [CT] the commitment tail, [OI] the oldest inbox, [CH] the + commitment head, and [H] the head, a typical rollup state is + + finalized uncommitted + ^^^^^^ ^^^^^^^^ + CT CH + [------------] commitments + [--------------] inboxes + OI H + ^^^^^^^^ + unfinalized + + Note that the oldest inbox level is not always lesser than the + commitment head. If the commitment head is equal to [None], it + means all the inboxes are “uncommitted”, that is, no commitments + have been submitted for them. + + In such a case, the rollup state is analoguous to + + finalized + ^^^^^^ + CT + [-----[ commitments + [--------------] inboxes + OI H + ^^^^^^^^^^^^^^^^ + uncommitted + + Similarly, it is possible to see the oldest inbox level set to + [None] (and the head level to), after every commitments in the + layer-1 storage have been properly finalized. In such a case, the + layout will be + + finalized + ^^^^^^ + CT + [-----[ commitments + [ inboxes + + + When a pointer is reset to [None], its next value will be decided + by its previous value. For instance, when the oldest inbox level is + set from [Some l] to [None], its next value is the successor level + of [l]. + + To implement this behavior, this module relies on four fields and + four functions which share the sama name. Once set to a given + value, the fields are never set back to [None]. It is the purpose + of the functions to determine or not a value is correct, or kept in + memory for future use, and only the functions are exposed to other + modules. + + Let’s take the [oldest_inbox_level], for instance. It is supposed + to be [None] iff there is no “uncommitted” inbox in the context, + and we can retreive the number of uncommitted inbox by computing + the difference between the fields [head_level] and + [oldest_inbox_level]. + + *) + let initial_state = { - first_unfinalized_level = None; - unfinalized_level_count = 0; + last_removed_commitment_hash = None; + commitment_tail_level = None; + oldest_inbox_level = None; + commitment_head_level = None; + head_level = None; burn_per_byte = Tez_repr.zero; inbox_ema = 0; - last_inbox_level = None; } let encoding : t Data_encoding.t = let open Data_encoding in conv (fun { - first_unfinalized_level; - unfinalized_level_count; + last_removed_commitment_hash; + commitment_tail_level; + oldest_inbox_level; + commitment_head_level; + head_level; burn_per_byte; inbox_ema; - last_inbox_level; } -> - ( first_unfinalized_level, - unfinalized_level_count, + ( last_removed_commitment_hash, + commitment_tail_level, + oldest_inbox_level, + commitment_head_level, + head_level, burn_per_byte, - inbox_ema, - last_inbox_level )) - (fun ( first_unfinalized_level, - unfinalized_level_count, + inbox_ema )) + (fun ( last_removed_commitment_hash, + commitment_tail_level, + oldest_inbox_level, + commitment_head_level, + head_level, burn_per_byte, - inbox_ema, - last_inbox_level ) -> + inbox_ema ) -> { - first_unfinalized_level; - unfinalized_level_count; + last_removed_commitment_hash; + commitment_tail_level; + oldest_inbox_level; + commitment_head_level; + head_level; burn_per_byte; inbox_ema; - last_inbox_level; }) - (obj5 - (req "first_unfinalized_level" (option Raw_level_repr.encoding)) - (req "unfinalized_level_count" int16) + (obj7 + (req + "last_removed_commitment_hash" + (option Tx_rollup_commitment_repr.Commitment_hash.encoding)) + (req "commitment_tail_level" (option Tx_rollup_level_repr.encoding)) + (req "oldest_inbox_level" (option Tx_rollup_level_repr.encoding)) + (req + "commitment_head_level" + (option + (obj2 + (req "level" Tx_rollup_level_repr.encoding) + (req "hash" Tx_rollup_commitment_repr.Commitment_hash.encoding)))) + (req + "head_level" + (option + (obj2 + (req "level" Tx_rollup_level_repr.encoding) + (req "tezos_level" Raw_level_repr.encoding)))) (req "burn_per_byte" Tez_repr.encoding) - (req "inbox_ema" int31) - (req "last_inbox_level" (option Raw_level_repr.encoding))) + (req "inbox_ema" int31)) let pp fmt { - first_unfinalized_level; - unfinalized_level_count; + last_removed_commitment_hash; + commitment_tail_level; + oldest_inbox_level; + commitment_head_level; + head_level; burn_per_byte; inbox_ema; - last_inbox_level; } = - Format.fprintf - fmt - "first_unfinalized_level: %a unfinalized_level_count: %d cost_per_byte: %a \ - inbox_ema: %d newest inbox: %a" - (Format.pp_print_option Raw_level_repr.pp) - first_unfinalized_level - unfinalized_level_count - Tez_repr.pp - burn_per_byte - inbox_ema - (Format.pp_print_option Raw_level_repr.pp) - last_inbox_level + Format.( + fprintf + fmt + "oldest_inbox_level: %a cost_per_byte: %a inbox_ema: %d head inbox: %a \ + commitment tail: %a commitment head: %a last_removed_commitment_hash: \ + %a" + (Format.pp_print_option Tx_rollup_level_repr.pp) + oldest_inbox_level + Tez_repr.pp + burn_per_byte + inbox_ema + (pp_print_option (fun fmt (tx_lvl, tezos_lvl) -> + fprintf + fmt + "(%a, %a)" + Tx_rollup_level_repr.pp + tx_lvl + Raw_level_repr.pp + tezos_lvl)) + head_level + (Format.pp_print_option Tx_rollup_level_repr.pp) + commitment_tail_level + (pp_print_option (fun fmt (tx_lvl, tezos_lvl) -> + fprintf + fmt + "(%a, %a)" + Tx_rollup_level_repr.pp + tx_lvl + Tx_rollup_commitment_repr.Commitment_hash.pp + tezos_lvl)) + commitment_head_level + (pp_print_option Tx_rollup_commitment_repr.Commitment_hash.pp) + last_removed_commitment_hash) let update_burn_per_byte : t -> final_size:int -> hard_limit:int -> t = fun ({burn_per_byte; inbox_ema; _} as state) ~final_size ~hard_limit -> @@ -168,78 +298,196 @@ let update_burn_per_byte : t -> final_size:int -> hard_limit:int -> t = be the maximum amount. *) | Error _ -> {state with burn_per_byte = Tez_repr.max_mutez; inbox_ema} -let burn {burn_per_byte; _} size = Tez_repr.(burn_per_byte *? Int64.of_int size) +let inboxes_count {head_level; oldest_inbox_level; _} = + match (oldest_inbox_level, head_level) with + | (Some oldest_level, Some (newest_level, _)) -> + let delta = + (* [Int32.succ] because the range is inclusive, i.e., [l; l] + has one inbox at level [l]. *) + Int32.succ @@ Tx_rollup_level_repr.diff newest_level oldest_level + in + Compare.Int32.max 0l delta |> Int32.to_int + | _ -> 0 + +let committed_inboxes_count {oldest_inbox_level; commitment_head_level; _} = + match (oldest_inbox_level, commitment_head_level) with + | (Some oldest_level, Some (newest_level, _)) -> + let delta = + (* [Int32.succ] because the range is inclusive, i.e., [l; l] + has one committed inbox at level [l]. *) + Int32.succ @@ Tx_rollup_level_repr.diff newest_level oldest_level + in + Compare.Int32.max 0l delta |> Int32.to_int + | _ -> 0 -let last_inbox_level {last_inbox_level; _} = last_inbox_level +let uncommitted_inboxes_count {head_level; commitment_head_level; _} = + match (commitment_head_level, head_level) with + | (Some (oldest_level, _), Some (newest_level, _)) -> + let delta = + (* No [Int32.succ] because the range is not inclusive. More + precisely, the [commitment_head_level] has one commitment, + and therefore is not part of the count. *) + Tx_rollup_level_repr.diff newest_level oldest_level + in + Compare.Int32.max 0l delta |> Int32.to_int + | _ -> 0 -let append_inbox t level = - { - t with - last_inbox_level = Some level; - first_unfinalized_level = - Some (Option.value ~default:level t.first_unfinalized_level); - unfinalized_level_count = t.unfinalized_level_count + 1; - } +let finalized_commitments_count {commitment_tail_level; oldest_inbox_level; _} = + match (commitment_tail_level, oldest_inbox_level) with + | (Some oldest_level, Some newest_level) -> + let delta = + (* No [Int32.succ] because the range is not inclusive. More + precisely, the [oldest_inbox_level] has not yet been + finalized. *) + Tx_rollup_level_repr.diff newest_level oldest_level + in + Compare.Int32.max 0l delta |> Int32.to_int + | _ -> 0 -let unfinalized_level_count {unfinalized_level_count; _} = - unfinalized_level_count +let commitment_head_level state = + if Compare.Int.(committed_inboxes_count state = 0) then None + else Option.map fst state.commitment_head_level -let first_unfinalized_level {first_unfinalized_level; _} = - first_unfinalized_level +let commitment_tail_level state = + if Compare.Int.(finalized_commitments_count state = 0) then None + else state.commitment_tail_level -let update_after_finalize state level count = - { - state with - first_unfinalized_level = level; - unfinalized_level_count = state.unfinalized_level_count - count; - } +let head_level state = + if Compare.Int.(inboxes_count state = 0) then None else state.head_level + +let oldest_inbox_level state = + if Compare.Int.(inboxes_count state = 0) then None + else state.oldest_inbox_level + +let next_commitment_level state = + match (commitment_head_level state, oldest_inbox_level state) with + | (Some commitment_head, Some _) -> + ok (Tx_rollup_level_repr.succ commitment_head) + | (None, Some oldest_inbox) -> ok oldest_inbox + | (_, _) -> error No_uncommitted_inbox + +let next_commitment_predecessor state = + Option.map snd state.commitment_head_level + +let record_inbox_creation t level = + (match t.head_level with + | Some (tx_lvl, tezos_lvl) -> + (if Raw_level_repr.(level <= tezos_lvl) then + error (Internal_error "Trying to create an inbox in the past") + else ok ()) + >>? fun () -> ok (Tx_rollup_level_repr.succ tx_lvl) + | None -> ok Tx_rollup_level_repr.root) + >>? fun tx_level -> + let oldest_inbox_level = + Some (Option.value ~default:tx_level t.oldest_inbox_level) + in + ok ({t with head_level = Some (tx_level, level); oldest_inbox_level}, tx_level) + +let record_inbox_deletion state candidate = + match state.oldest_inbox_level with + | Some level + when Compare.Int.(0 < inboxes_count state) + && Tx_rollup_level_repr.(candidate = level) -> + let oldest_inbox_level = Some (Tx_rollup_level_repr.succ level) in + ok {state with oldest_inbox_level} + | _ -> error (Internal_error "Trying to delete the wrong inbox") + +let record_commitment_creation state level hash = + let commitment_tail_level = + Some (Option.value ~default:level state.commitment_tail_level) + in + let state = {state with commitment_tail_level} in + match (commitment_head_level state, oldest_inbox_level state) with + | (Some commitment_head, Some _) + when Tx_rollup_level_repr.(level = succ commitment_head) -> + ok {state with commitment_head_level = Some (level, hash)} + | (None, Some oldest) when Tx_rollup_level_repr.(level = oldest) -> + ok {state with commitment_head_level = Some (level, hash)} + | _ -> + error + (Internal_error "Trying to create a commitment at an incorrect level") + +let record_commitment_rejection state level predecessor_hash = + let unwrap_option msg = function + | Some x -> ok x + | _ -> error (Internal_error msg) + in + let check_none msg = function + | None -> ok () + | Some _ -> error (Internal_error msg) + in + match (oldest_inbox_level state, commitment_head_level state) with + | (Some inbox_tail, Some commitment_head) + when Tx_rollup_level_repr.(inbox_tail <= level && level <= commitment_head) + -> ( + match (commitment_tail_level state, Tx_rollup_level_repr.pred level) with + | (Some commitment_tail, Some pred_level) + when Tx_rollup_level_repr.(commitment_tail <= pred_level) -> + unwrap_option "Missing predecessor commitment" predecessor_hash + >>? fun pred_hash -> + ok {state with commitment_head_level = Some (pred_level, pred_hash)} + | (None, Some pred_level) -> + check_none "Unexpected predecessor hash" predecessor_hash + >>? fun () -> + unwrap_option + "Missing commitment hash" + state.last_removed_commitment_hash + >>? fun pred_hash -> + ok {state with commitment_head_level = Some (pred_level, pred_hash)} + | (None, None) -> + check_none + "Unexpected last removed commitment" + state.last_removed_commitment_hash + >>? fun () -> ok {state with commitment_head_level = None} + | _ -> error (Internal_error "Machine state inconsistency")) + | _ -> error (Internal_error "No commitment to reject") + +let record_commitment_deletion state level hash = + match commitment_tail_level state with + | Some tail when Tx_rollup_level_repr.(level = tail) -> + ok + { + state with + commitment_tail_level = Some (Tx_rollup_level_repr.succ tail); + last_removed_commitment_hash = Some hash; + } + | _ -> error (Internal_error "Trying to remove an incorrect commitment") let burn ~limit state size = - burn state size >>? fun burn -> + Tez_repr.(state.burn_per_byte *? Int64.of_int size) >>? fun burn -> match limit with | Some limit when Tez_repr.(limit >= burn) -> - error (Tx_rollup_submit_batch_burn_excedeed {burn; limit}) + error (Submit_batch_burn_excedeed {burn; limit}) | _ -> ok burn -(* ------ Error registration ------------------------------------------------ *) - -let () = - (* Tx_rollup_submit_batch_burn_excedeed *) - register_error_kind - `Permanent - ~id:"operation.tx_rollup_submit_batch_burn_excedeed" - ~title:"Submit batch excedeed burn limit" - ~description: - "The submit batch would exceed the burn limit, we withdraw the submit." - ~pp:(fun ppf (burn, limit) -> - Format.fprintf - ppf - "Cannot submit the batch of L2 operations as the cost (%a) would \ - exceed the burn limit (%a)" - Tez_repr.pp - burn - Tez_repr.pp - limit) - Data_encoding.( - obj2 (req "burn" Tez_repr.encoding) (req "limit" Tez_repr.encoding)) - (function - | Tx_rollup_submit_batch_burn_excedeed {burn; limit} -> Some (burn, limit) - | _ -> None) - (fun (burn, limit) -> Tx_rollup_submit_batch_burn_excedeed {burn; limit}) - module Internal_for_tests = struct let make : - burn_per_byte:Tez_repr.t -> - inbox_ema:int -> - last_inbox_level:Raw_level_repr.t option -> + ?burn_per_byte:Tez_repr.t -> + ?inbox_ema:int -> + ?last_removed_commitment_hash:Tx_rollup_commitment_repr.Commitment_hash.t -> + ?commitment_tail_level:Tx_rollup_level_repr.t -> + ?oldest_inbox_level:Tx_rollup_level_repr.t -> + ?commitment_head_level: + Tx_rollup_level_repr.t * Tx_rollup_commitment_repr.Commitment_hash.t -> + ?head_level:Tx_rollup_level_repr.t * Raw_level_repr.t -> + unit -> t = - fun ~burn_per_byte ~inbox_ema ~last_inbox_level -> + fun ?(burn_per_byte = Tez_repr.zero) + ?(inbox_ema = 0) + ?last_removed_commitment_hash + ?commitment_tail_level + ?oldest_inbox_level + ?commitment_head_level + ?head_level + () -> { + last_removed_commitment_hash; burn_per_byte; inbox_ema; - last_inbox_level; - first_unfinalized_level = None; - unfinalized_level_count = 0; + commitment_tail_level; + oldest_inbox_level; + commitment_head_level; + head_level; } let get_inbox_ema : t -> int = fun {inbox_ema; _} -> inbox_ema diff --git a/src/proto_alpha/lib_protocol/tx_rollup_state_repr.mli b/src/proto_alpha/lib_protocol/tx_rollup_state_repr.mli index f7bc5863d072..74c17526f86b 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_state_repr.mli +++ b/src/proto_alpha/lib_protocol/tx_rollup_state_repr.mli @@ -25,12 +25,6 @@ (* *) (*****************************************************************************) -type error += - | Tx_rollup_submit_batch_burn_excedeed of { - burn : Tez_repr.t; - limit : Tez_repr.t; - } - (** The state of a transaction rollup is a set of variables that vary in time, as the rollup progresses. *) type t @@ -65,34 +59,120 @@ val update_burn_per_byte : t -> final_size:int -> hard_limit:int -> t *) val burn : limit:Tez_repr.t option -> t -> int -> Tez_repr.t tzresult -(** [last_inbox_level state] returns the last level for which any messages - have been submitted, or None if no messages have been submitted. *) -val last_inbox_level : t -> Raw_level_repr.t option - -(** [append_inbox state level] updates the newest inbox field for a - [state] when messages have been added at a level. *) -val append_inbox : t -> Raw_level_repr.t -> t - -(** [unfinalized_level_count state] returns the number of unfinalized - levels of the rollup. If this is too high, we stop appending - messages until commitments catch up. *) -val unfinalized_level_count : t -> int - -(** [first_unfinalized_level state] returns the first unfinalized - level of the rollup. Note that this level might be empty.*) -val first_unfinalized_level : t -> Raw_level_repr.t option - -(* [update_after_finalize state level count] updates a state - after some levels have been finalized. [count] is the number of - finalized levels. *) -val update_after_finalize : t -> Raw_level_repr.t option -> int -> t +(** [head_level state] returns the rollup level of the most recent + inbox —if it exists— long with the Tezos level at which this inbox + was created. *) +val head_level : t -> (Tx_rollup_level_repr.t * Raw_level_repr.t) option + +(** [commitment_head_level state] returns the rollup level of the most + recent unfinalized commitment, if it exists. *) +val commitment_head_level : t -> Tx_rollup_level_repr.t option + +(** [commitment_tail_level state] returns the rollup level of the + oldest finalized commitment still in the layer-1 context, if it + exists. *) +val commitment_tail_level : t -> Tx_rollup_level_repr.t option + +(** [uncommitted_inboxes_count state] returns the number of inboxes + the rollup current has in the storage which did not receive a + commitment yet. *) +val uncommitted_inboxes_count : t -> int + +(** [finalized_commitments_count t] returns the number of finalized + commitment still in the layer-1 context. *) +val finalized_commitments_count : t -> int + +(** [inboxes_count state] returns the number of inboxes the rollup + current has in the storage. *) +val inboxes_count : t -> int + +(** [oldest_inbox_level state] returns the level of the oldest inbox + of a rollup that is still in the layer-1 context, if it exists. *) +val oldest_inbox_level : t -> Tx_rollup_level_repr.t option + +(** [next_commitment_level state] returns the expected level of the + next valid commitment. + + This functions can return the error [No_uncommitted_inbox] if + there is no inbox awaiting a commitment. *) +val next_commitment_level : t -> Tx_rollup_level_repr.t tzresult + +(** [next_commitment_predecessor state] returns the expected + predecessor hash of the next valid commitment. *) +val next_commitment_predecessor : + t -> Tx_rollup_commitment_repr.Commitment_hash.t option + +(** [record_inbox_creation state level] updates the state of a rollup + to take into account the creation of of a new inbox at the given + Tezos [level], and returns the rollup level to associate to this + inbox. + + This functions may return an [Internal_error] iff an inbox has + already been created at a level greater (or equal) than + [level]. It is the responsibility of the caller to avoid that. *) +val record_inbox_creation : + t -> Raw_level_repr.t -> (t * Tx_rollup_level_repr.t) tzresult + +(** [record_inbox_deletion state level] updates [state] to take into + account the deletion of the inbox stored at Tezos [level] from the + storage. + + This functions returns an [Internal_error] iff there is no inbox + in the storage of the layer-1, or if [level] is not the oldest + level of rollup. *) +val record_inbox_deletion : t -> Tx_rollup_level_repr.t -> t tzresult + +(** [record_commitment_creation state level] updates [state] to take + into account the creation of a commitment at a given Tezos + [level]. + + This function returns an [Internal_error] if [level] is not the + successor level of the current commitment head, or if [level] is + greater than the inbox head. *) +val record_commitment_creation : + t -> + Tx_rollup_level_repr.t -> + Tx_rollup_commitment_repr.Commitment_hash.t -> + t tzresult + +(** [record_commitment_rejection state level pred_hash] updates + [state] to take into account the fact that the commitment for the + inbox at [level] has been rejected. + + The caller is expected to provide the predecessor hash the next + valid commitment needs to use. It can be omitted under two + circumstances: if [level = root], or if the commitment identified + by [pred_hash] is no longer in the layer-1 context. *) +val record_commitment_rejection : + t -> + Tx_rollup_level_repr.t -> + Tx_rollup_commitment_repr.Commitment_hash.t option -> + t tzresult + +(** [record_commitment_deletion state level hash] updates [state] to + take into account the deletion of a commitment at a given rollup + [level], and of given [hash]. + + This function returns an [Internal_error] if [level] is not the + commitment tail, that is the oldest finalized commitment. *) +val record_commitment_deletion : + t -> + Tx_rollup_level_repr.t -> + Tx_rollup_commitment_repr.Commitment_hash.t -> + t tzresult module Internal_for_tests : sig (** [make] returns a state for tests *) val make : - burn_per_byte:Tez_repr.t -> - inbox_ema:int -> - last_inbox_level:Raw_level_repr.t option -> + ?burn_per_byte:Tez_repr.t -> + ?inbox_ema:int -> + ?last_removed_commitment_hash:Tx_rollup_commitment_repr.Commitment_hash.t -> + ?commitment_tail_level:Tx_rollup_level_repr.t -> + ?oldest_inbox_level:Tx_rollup_level_repr.t -> + ?commitment_head_level: + Tx_rollup_level_repr.t * Tx_rollup_commitment_repr.Commitment_hash.t -> + ?head_level:Tx_rollup_level_repr.t * Raw_level_repr.t -> + unit -> t val get_inbox_ema : t -> int diff --git a/src/proto_alpha/lib_protocol/tx_rollup_state_storage.ml b/src/proto_alpha/lib_protocol/tx_rollup_state_storage.ml index 9f8ed228492f..6d8a4d2f6d2f 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_state_storage.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_state_storage.ml @@ -25,9 +25,7 @@ (* *) (*****************************************************************************) -type error += - | Tx_rollup_already_exists of Tx_rollup_repr.t - | Tx_rollup_does_not_exist of Tx_rollup_repr.t +open Tx_rollup_errors_repr let init : Raw_context.t -> Tx_rollup_repr.t -> Raw_context.t tzresult Lwt.t = fun ctxt tx_rollup -> @@ -68,50 +66,3 @@ let update : fun ctxt tx_rollup t -> Storage.Tx_rollup.State.update ctxt tx_rollup t >>=? fun (ctxt, _) -> return ctxt - -(* ------ Error registration ------------------------------------------------ *) - -let () = - let open Data_encoding in - (* Tx_rollup_already_exists *) - register_error_kind - `Permanent - ~id:"tx_rollup_already_exists" - ~title:"Transaction rollup was already created" - ~description: - "The protocol tried to originate the same transaction rollup twice" - ~pp:(fun ppf addr -> - Format.fprintf - ppf - "Transaction rollup %a is already used for an existing transaction \ - rollup. This should not happen, and indicates there is a bug in the \ - protocol. If you can, please report this bug \ - (https://gitlab.com/tezos/tezos/-/issues.)" - Tx_rollup_repr.pp - addr) - (obj1 (req "rollup_address" Tx_rollup_repr.encoding)) - (function Tx_rollup_already_exists rollup -> Some rollup | _ -> None) - (fun rollup -> Tx_rollup_already_exists rollup) ; - (* Tx_rollup_does_not_exist *) - register_error_kind - `Temporary - ~id:"tx_rollup_does_not_exist" - ~title:"Transaction rollup does not exist" - ~description:"An invalid transaction rollup address was submitted" - ~pp:(fun ppf addr -> - Format.fprintf - ppf - "Invalid transaction rollup address %a" - Tx_rollup_repr.pp - addr) - (obj1 (req "rollup_address" Tx_rollup_repr.encoding)) - (function Tx_rollup_does_not_exist rollup -> Some rollup | _ -> None) - (fun rollup -> Tx_rollup_does_not_exist rollup) - -let first_unfinalized_level : - Raw_context.t -> - Tx_rollup_repr.t -> - (Raw_context.t * Raw_level_repr.t option) tzresult Lwt.t = - fun ctxt tx_rollup -> - Storage.Tx_rollup.State.get ctxt tx_rollup >>=? fun (ctxt, state) -> - return (ctxt, Tx_rollup_state_repr.first_unfinalized_level state) diff --git a/src/proto_alpha/lib_protocol/tx_rollup_state_storage.mli b/src/proto_alpha/lib_protocol/tx_rollup_state_storage.mli index ff6a981f2e89..6c2d39204cbb 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_state_storage.mli +++ b/src/proto_alpha/lib_protocol/tx_rollup_state_storage.mli @@ -31,10 +31,6 @@ Except if the contrary is explicitly stated, the functions of this module are carbonated. *) -type error += - | Tx_rollup_already_exists of Tx_rollup_repr.t - | Tx_rollup_does_not_exist of Tx_rollup_repr.t - (** [init ctxt tx_rollup] initializes the state of [tx_rollup]. Returns the error [Tx_rollup_already_exists] iff this function has @@ -80,11 +76,3 @@ val update : transaction rollup address. *) val assert_exist : Raw_context.t -> Tx_rollup_repr.t -> Raw_context.t tzresult Lwt.t - -(** [first_unfinalized_level] returns the first unfinalized level - of [tx_rollup]. If None, then there are no unfinalized levels - with inboxes. *) -val first_unfinalized_level : - Raw_context.t -> - Tx_rollup_repr.t -> - (Raw_context.t * Raw_level_repr.t option) tzresult Lwt.t diff --git a/src/proto_alpha/lib_protocol/tx_rollup_storage.ml b/src/proto_alpha/lib_protocol/tx_rollup_storage.ml index dc28f0a271b9..b709af0165cf 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_storage.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_storage.ml @@ -35,23 +35,25 @@ let originate ctxt = let update_tx_rollups_at_block_finalization : Raw_context.t -> Raw_context.t tzresult Lwt.t = fun ctxt -> - let level = (Raw_context.current_level ctxt).level in - Storage.Tx_rollup.fold ctxt level ~init:(ok ctxt) ~f:(fun tx_rollup ctxt -> - ctxt >>?= fun ctxt -> - (* This call cannot failed as long as we systematically check - that a transaction rollup exists before creating a new - inbox. *) + let (ctxt, rollups) = Raw_context.flush_tx_rollups ctxt in + Tx_rollup_repr.Set.fold_es + (fun tx_rollup ctxt -> Tx_rollup_state_storage.get ctxt tx_rollup >>=? fun (ctxt, state) -> - Tx_rollup_inbox_storage.get ~level:(`Level level) ctxt tx_rollup - >>=? fun (ctxt, inbox) -> - let hard_limit = - Constants_storage.tx_rollup_hard_size_limit_per_inbox ctxt - in - let state = - Tx_rollup_state_repr.update_burn_per_byte - state - ~final_size:inbox.cumulated_size - ~hard_limit - in - Storage.Tx_rollup.State.add ctxt tx_rollup state >|=? fun (ctxt, _, _) -> - ctxt) + match Tx_rollup_state_repr.head_level state with + | Some (tx_level, _) -> + Tx_rollup_inbox_storage.get ctxt tx_level tx_rollup + >>=? fun (ctxt, inbox) -> + let hard_limit = + Constants_storage.tx_rollup_hard_size_limit_per_inbox ctxt + in + let state = + Tx_rollup_state_repr.update_burn_per_byte + state + ~final_size:inbox.cumulated_size + ~hard_limit + in + Storage.Tx_rollup.State.add ctxt tx_rollup state + >|=? fun (ctxt, _, _) -> ctxt + | None -> (* this cannot happen *) return ctxt) + rollups + ctxt diff --git a/tests_python/tests_alpha/test_mockup.py b/tests_python/tests_alpha/test_mockup.py index bb7152035ade..941e4664818d 100644 --- a/tests_python/tests_alpha/test_mockup.py +++ b/tests_python/tests_alpha/test_mockup.py @@ -661,6 +661,7 @@ def _test_create_mockup_init_show_roundtrip( "tx_rollup_hard_size_limit_per_message": 9_999, "tx_rollup_commitment_bond": "10000000000", "tx_rollup_finality_period": 2000, + "tx_rollup_withdraw_period": 123456, "tx_rollup_max_unfinalized_levels": 2100, "sc_rollup_enable": False, "sc_rollup_origination_size": 6_314, diff --git a/tezt/_regressions/rpc/alpha.client.mempool.out b/tezt/_regressions/rpc/alpha.client.mempool.out index b829e22c6fa4..07ae2f68751f 100644 --- a/tezt/_regressions/rpc/alpha.client.mempool.out +++ b/tezt/_regressions/rpc/alpha.client.mempool.out @@ -2002,13 +2002,93 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "additionalProperties": false }, { - "title": "Tx_rollup_finalize", + "title": "Tx_rollup_finalize_commitment", "type": "object", "properties": { "kind": { "type": "string", "enum": [ - "tx_rollup_finalize" + "tx_rollup_finalize_commitment" + ] + }, + "source": { + "$ref": "#/definitions/Signature.Public_key_hash" + }, + "fee": { + "$ref": "#/definitions/alpha.mutez" + }, + "counter": { + "$ref": "#/definitions/positive_bignum" + }, + "gas_limit": { + "$ref": "#/definitions/positive_bignum" + }, + "storage_limit": { + "$ref": "#/definitions/positive_bignum" + }, + "rollup": { + "$ref": "#/definitions/alpha.tx_rollup_id" + } + }, + "required": [ + "rollup", + "storage_limit", + "gas_limit", + "counter", + "fee", + "source", + "kind" + ], + "additionalProperties": false + }, + { + "title": "Tx_rollup_remove_commitment", + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "tx_rollup_remove_commitment" + ] + }, + "source": { + "$ref": "#/definitions/Signature.Public_key_hash" + }, + "fee": { + "$ref": "#/definitions/alpha.mutez" + }, + "counter": { + "$ref": "#/definitions/positive_bignum" + }, + "gas_limit": { + "$ref": "#/definitions/positive_bignum" + }, + "storage_limit": { + "$ref": "#/definitions/positive_bignum" + }, + "rollup": { + "$ref": "#/definitions/alpha.tx_rollup_id" + } + }, + "required": [ + "rollup", + "storage_limit", + "gas_limit", + "counter", + "fee", + "source", + "kind" + ], + "additionalProperties": false + }, + { + "title": "Tx_rollup_rejection", + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "tx_rollup_rejection" ] }, "source": { @@ -2033,9 +2113,23 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "type": "integer", "minimum": -2147483648, "maximum": 2147483647 + }, + "message": { + "$ref": "#/definitions/unistring" + }, + "message_position": { + "type": "integer", + "minimum": -1073741824, + "maximum": 1073741823 + }, + "proof": { + "type": "boolean" } }, "required": [ + "proof", + "message_position", + "message", "level", "rollup", "storage_limit", @@ -5215,6 +5309,176 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "tag": 154, + "fields": [ + { + "name": "Tag", + "layout": { + "size": "Uint8", + "kind": "Int" + }, + "data_kind": { + "size": 1, + "kind": "Float" + }, + "kind": "named" + }, + { + "name": "source", + "layout": { + "name": "public_key_hash", + "kind": "Ref" + }, + "data_kind": { + "size": 21, + "kind": "Float" + }, + "kind": "named" + }, + { + "name": "fee", + "layout": { + "name": "N.t", + "kind": "Ref" + }, + "data_kind": { + "kind": "Dynamic" + }, + "kind": "named" + }, + { + "name": "counter", + "layout": { + "name": "N.t", + "kind": "Ref" + }, + "data_kind": { + "kind": "Dynamic" + }, + "kind": "named" + }, + { + "name": "gas_limit", + "layout": { + "name": "N.t", + "kind": "Ref" + }, + "data_kind": { + "kind": "Dynamic" + }, + "kind": "named" + }, + { + "name": "storage_limit", + "layout": { + "name": "N.t", + "kind": "Ref" + }, + "data_kind": { + "kind": "Dynamic" + }, + "kind": "named" + }, + { + "name": "rollup", + "layout": { + "kind": "Bytes" + }, + "data_kind": { + "size": 20, + "kind": "Float" + }, + "kind": "named" + } + ], + "name": "Tx_rollup_finalize_commitment" + }, + { + "tag": 155, + "fields": [ + { + "name": "Tag", + "layout": { + "size": "Uint8", + "kind": "Int" + }, + "data_kind": { + "size": 1, + "kind": "Float" + }, + "kind": "named" + }, + { + "name": "source", + "layout": { + "name": "public_key_hash", + "kind": "Ref" + }, + "data_kind": { + "size": 21, + "kind": "Float" + }, + "kind": "named" + }, + { + "name": "fee", + "layout": { + "name": "N.t", + "kind": "Ref" + }, + "data_kind": { + "kind": "Dynamic" + }, + "kind": "named" + }, + { + "name": "counter", + "layout": { + "name": "N.t", + "kind": "Ref" + }, + "data_kind": { + "kind": "Dynamic" + }, + "kind": "named" + }, + { + "name": "gas_limit", + "layout": { + "name": "N.t", + "kind": "Ref" + }, + "data_kind": { + "kind": "Dynamic" + }, + "kind": "named" + }, + { + "name": "storage_limit", + "layout": { + "name": "N.t", + "kind": "Ref" + }, + "data_kind": { + "kind": "Dynamic" + }, + "kind": "named" + }, + { + "name": "rollup", + "layout": { + "kind": "Bytes" + }, + "data_kind": { + "size": 20, + "kind": "Float" + }, + "kind": "named" + } + ], + "name": "Tx_rollup_remove_commitment" + }, + { + "tag": 156, "fields": [ { "name": "Tag", @@ -5306,9 +5570,48 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "kind": "Float" }, "kind": "named" + }, + { + "kind": "dyn", + "num_fields": 1, + "size": "Uint30" + }, + { + "name": "message", + "layout": { + "kind": "String" + }, + "data_kind": { + "kind": "Variable" + }, + "kind": "named" + }, + { + "name": "message_position", + "layout": { + "min": -1073741824, + "max": 1073741823, + "kind": "RangedInt" + }, + "data_kind": { + "size": 4, + "kind": "Float" + }, + "kind": "named" + }, + { + "name": "proof", + "layout": { + "kind": "Bool" + }, + "data_kind": { + "size": 1, + "kind": "Float" + }, + "kind": "named" } ], - "name": "Tx_rollup_finalize" + "name": "Tx_rollup_rejection" }, { "tag": 200, @@ -7580,13 +7883,93 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "additionalProperties": false }, { - "title": "Tx_rollup_finalize", + "title": "Tx_rollup_finalize_commitment", "type": "object", "properties": { "kind": { "type": "string", "enum": [ - "tx_rollup_finalize" + "tx_rollup_finalize_commitment" + ] + }, + "source": { + "$ref": "#/definitions/Signature.Public_key_hash" + }, + "fee": { + "$ref": "#/definitions/alpha.mutez" + }, + "counter": { + "$ref": "#/definitions/positive_bignum" + }, + "gas_limit": { + "$ref": "#/definitions/positive_bignum" + }, + "storage_limit": { + "$ref": "#/definitions/positive_bignum" + }, + "rollup": { + "$ref": "#/definitions/alpha.tx_rollup_id" + } + }, + "required": [ + "rollup", + "storage_limit", + "gas_limit", + "counter", + "fee", + "source", + "kind" + ], + "additionalProperties": false + }, + { + "title": "Tx_rollup_remove_commitment", + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "tx_rollup_remove_commitment" + ] + }, + "source": { + "$ref": "#/definitions/Signature.Public_key_hash" + }, + "fee": { + "$ref": "#/definitions/alpha.mutez" + }, + "counter": { + "$ref": "#/definitions/positive_bignum" + }, + "gas_limit": { + "$ref": "#/definitions/positive_bignum" + }, + "storage_limit": { + "$ref": "#/definitions/positive_bignum" + }, + "rollup": { + "$ref": "#/definitions/alpha.tx_rollup_id" + } + }, + "required": [ + "rollup", + "storage_limit", + "gas_limit", + "counter", + "fee", + "source", + "kind" + ], + "additionalProperties": false + }, + { + "title": "Tx_rollup_rejection", + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "tx_rollup_rejection" ] }, "source": { @@ -7611,9 +7994,23 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "type": "integer", "minimum": -2147483648, "maximum": 2147483647 + }, + "message": { + "$ref": "#/definitions/unistring" + }, + "message_position": { + "type": "integer", + "minimum": -1073741824, + "maximum": 1073741823 + }, + "proof": { + "type": "boolean" } }, "required": [ + "proof", + "message_position", + "message", "level", "rollup", "storage_limit", diff --git a/tezt/_regressions/rpc/alpha.client.others.out b/tezt/_regressions/rpc/alpha.client.others.out index 4006be92fd7a..8f30180d58df 100644 --- a/tezt/_regressions/rpc/alpha.client.others.out +++ b/tezt/_regressions/rpc/alpha.client.others.out @@ -33,7 +33,7 @@ tezt/_regressions/rpc/alpha.client.others.out "tx_rollup_hard_size_limit_per_inbox": 100000, "tx_rollup_hard_size_limit_per_message": 5000, "tx_rollup_commitment_bond": "10000000000", - "tx_rollup_finality_period": 2000, + "tx_rollup_finality_period": 2000, "tx_rollup_withdraw_period": 60000, "tx_rollup_max_unfinalized_levels": 2100, "sc_rollup_enable": false, "sc_rollup_origination_size": 6314 } diff --git a/tezt/_regressions/rpc/alpha.light.others.out b/tezt/_regressions/rpc/alpha.light.others.out index 2976a8e0ec1e..0bdd0045eb03 100644 --- a/tezt/_regressions/rpc/alpha.light.others.out +++ b/tezt/_regressions/rpc/alpha.light.others.out @@ -34,7 +34,7 @@ protocol of light mode unspecified, using the node's protocol: ProtoGenesisGenes "tx_rollup_hard_size_limit_per_inbox": 100000, "tx_rollup_hard_size_limit_per_message": 5000, "tx_rollup_commitment_bond": "10000000000", - "tx_rollup_finality_period": 2000, + "tx_rollup_finality_period": 2000, "tx_rollup_withdraw_period": 60000, "tx_rollup_max_unfinalized_levels": 2100, "sc_rollup_enable": false, "sc_rollup_origination_size": 6314 } diff --git a/tezt/_regressions/rpc/alpha.proxy.mempool.out b/tezt/_regressions/rpc/alpha.proxy.mempool.out index 8af62c08e554..fa0e6a142d0c 100644 --- a/tezt/_regressions/rpc/alpha.proxy.mempool.out +++ b/tezt/_regressions/rpc/alpha.proxy.mempool.out @@ -2023,13 +2023,93 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "additionalProperties": false }, { - "title": "Tx_rollup_finalize", + "title": "Tx_rollup_finalize_commitment", "type": "object", "properties": { "kind": { "type": "string", "enum": [ - "tx_rollup_finalize" + "tx_rollup_finalize_commitment" + ] + }, + "source": { + "$ref": "#/definitions/Signature.Public_key_hash" + }, + "fee": { + "$ref": "#/definitions/alpha.mutez" + }, + "counter": { + "$ref": "#/definitions/positive_bignum" + }, + "gas_limit": { + "$ref": "#/definitions/positive_bignum" + }, + "storage_limit": { + "$ref": "#/definitions/positive_bignum" + }, + "rollup": { + "$ref": "#/definitions/alpha.tx_rollup_id" + } + }, + "required": [ + "rollup", + "storage_limit", + "gas_limit", + "counter", + "fee", + "source", + "kind" + ], + "additionalProperties": false + }, + { + "title": "Tx_rollup_remove_commitment", + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "tx_rollup_remove_commitment" + ] + }, + "source": { + "$ref": "#/definitions/Signature.Public_key_hash" + }, + "fee": { + "$ref": "#/definitions/alpha.mutez" + }, + "counter": { + "$ref": "#/definitions/positive_bignum" + }, + "gas_limit": { + "$ref": "#/definitions/positive_bignum" + }, + "storage_limit": { + "$ref": "#/definitions/positive_bignum" + }, + "rollup": { + "$ref": "#/definitions/alpha.tx_rollup_id" + } + }, + "required": [ + "rollup", + "storage_limit", + "gas_limit", + "counter", + "fee", + "source", + "kind" + ], + "additionalProperties": false + }, + { + "title": "Tx_rollup_rejection", + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "tx_rollup_rejection" ] }, "source": { @@ -2054,9 +2134,23 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "type": "integer", "minimum": -2147483648, "maximum": 2147483647 + }, + "message": { + "$ref": "#/definitions/unistring" + }, + "message_position": { + "type": "integer", + "minimum": -1073741824, + "maximum": 1073741823 + }, + "proof": { + "type": "boolean" } }, "required": [ + "proof", + "message_position", + "message", "level", "rollup", "storage_limit", @@ -5236,6 +5330,176 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "tag": 154, + "fields": [ + { + "name": "Tag", + "layout": { + "size": "Uint8", + "kind": "Int" + }, + "data_kind": { + "size": 1, + "kind": "Float" + }, + "kind": "named" + }, + { + "name": "source", + "layout": { + "name": "public_key_hash", + "kind": "Ref" + }, + "data_kind": { + "size": 21, + "kind": "Float" + }, + "kind": "named" + }, + { + "name": "fee", + "layout": { + "name": "N.t", + "kind": "Ref" + }, + "data_kind": { + "kind": "Dynamic" + }, + "kind": "named" + }, + { + "name": "counter", + "layout": { + "name": "N.t", + "kind": "Ref" + }, + "data_kind": { + "kind": "Dynamic" + }, + "kind": "named" + }, + { + "name": "gas_limit", + "layout": { + "name": "N.t", + "kind": "Ref" + }, + "data_kind": { + "kind": "Dynamic" + }, + "kind": "named" + }, + { + "name": "storage_limit", + "layout": { + "name": "N.t", + "kind": "Ref" + }, + "data_kind": { + "kind": "Dynamic" + }, + "kind": "named" + }, + { + "name": "rollup", + "layout": { + "kind": "Bytes" + }, + "data_kind": { + "size": 20, + "kind": "Float" + }, + "kind": "named" + } + ], + "name": "Tx_rollup_finalize_commitment" + }, + { + "tag": 155, + "fields": [ + { + "name": "Tag", + "layout": { + "size": "Uint8", + "kind": "Int" + }, + "data_kind": { + "size": 1, + "kind": "Float" + }, + "kind": "named" + }, + { + "name": "source", + "layout": { + "name": "public_key_hash", + "kind": "Ref" + }, + "data_kind": { + "size": 21, + "kind": "Float" + }, + "kind": "named" + }, + { + "name": "fee", + "layout": { + "name": "N.t", + "kind": "Ref" + }, + "data_kind": { + "kind": "Dynamic" + }, + "kind": "named" + }, + { + "name": "counter", + "layout": { + "name": "N.t", + "kind": "Ref" + }, + "data_kind": { + "kind": "Dynamic" + }, + "kind": "named" + }, + { + "name": "gas_limit", + "layout": { + "name": "N.t", + "kind": "Ref" + }, + "data_kind": { + "kind": "Dynamic" + }, + "kind": "named" + }, + { + "name": "storage_limit", + "layout": { + "name": "N.t", + "kind": "Ref" + }, + "data_kind": { + "kind": "Dynamic" + }, + "kind": "named" + }, + { + "name": "rollup", + "layout": { + "kind": "Bytes" + }, + "data_kind": { + "size": 20, + "kind": "Float" + }, + "kind": "named" + } + ], + "name": "Tx_rollup_remove_commitment" + }, + { + "tag": 156, "fields": [ { "name": "Tag", @@ -5327,9 +5591,48 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "kind": "Float" }, "kind": "named" + }, + { + "kind": "dyn", + "num_fields": 1, + "size": "Uint30" + }, + { + "name": "message", + "layout": { + "kind": "String" + }, + "data_kind": { + "kind": "Variable" + }, + "kind": "named" + }, + { + "name": "message_position", + "layout": { + "min": -1073741824, + "max": 1073741823, + "kind": "RangedInt" + }, + "data_kind": { + "size": 4, + "kind": "Float" + }, + "kind": "named" + }, + { + "name": "proof", + "layout": { + "kind": "Bool" + }, + "data_kind": { + "size": 1, + "kind": "Float" + }, + "kind": "named" } ], - "name": "Tx_rollup_finalize" + "name": "Tx_rollup_rejection" }, { "tag": 200, @@ -7601,13 +7904,93 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "additionalProperties": false }, { - "title": "Tx_rollup_finalize", + "title": "Tx_rollup_finalize_commitment", "type": "object", "properties": { "kind": { "type": "string", "enum": [ - "tx_rollup_finalize" + "tx_rollup_finalize_commitment" + ] + }, + "source": { + "$ref": "#/definitions/Signature.Public_key_hash" + }, + "fee": { + "$ref": "#/definitions/alpha.mutez" + }, + "counter": { + "$ref": "#/definitions/positive_bignum" + }, + "gas_limit": { + "$ref": "#/definitions/positive_bignum" + }, + "storage_limit": { + "$ref": "#/definitions/positive_bignum" + }, + "rollup": { + "$ref": "#/definitions/alpha.tx_rollup_id" + } + }, + "required": [ + "rollup", + "storage_limit", + "gas_limit", + "counter", + "fee", + "source", + "kind" + ], + "additionalProperties": false + }, + { + "title": "Tx_rollup_remove_commitment", + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "tx_rollup_remove_commitment" + ] + }, + "source": { + "$ref": "#/definitions/Signature.Public_key_hash" + }, + "fee": { + "$ref": "#/definitions/alpha.mutez" + }, + "counter": { + "$ref": "#/definitions/positive_bignum" + }, + "gas_limit": { + "$ref": "#/definitions/positive_bignum" + }, + "storage_limit": { + "$ref": "#/definitions/positive_bignum" + }, + "rollup": { + "$ref": "#/definitions/alpha.tx_rollup_id" + } + }, + "required": [ + "rollup", + "storage_limit", + "gas_limit", + "counter", + "fee", + "source", + "kind" + ], + "additionalProperties": false + }, + { + "title": "Tx_rollup_rejection", + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "tx_rollup_rejection" ] }, "source": { @@ -7632,9 +8015,23 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "type": "integer", "minimum": -2147483648, "maximum": 2147483647 + }, + "message": { + "$ref": "#/definitions/unistring" + }, + "message_position": { + "type": "integer", + "minimum": -1073741824, + "maximum": 1073741823 + }, + "proof": { + "type": "boolean" } }, "required": [ + "proof", + "message_position", + "message", "level", "rollup", "storage_limit", diff --git a/tezt/_regressions/rpc/alpha.proxy.others.out b/tezt/_regressions/rpc/alpha.proxy.others.out index b72844eea414..79ba9e3ea539 100644 --- a/tezt/_regressions/rpc/alpha.proxy.others.out +++ b/tezt/_regressions/rpc/alpha.proxy.others.out @@ -34,7 +34,7 @@ protocol of proxy unspecified, using the node's protocol: ProtoGenesisGenesisGen "tx_rollup_hard_size_limit_per_inbox": 100000, "tx_rollup_hard_size_limit_per_message": 5000, "tx_rollup_commitment_bond": "10000000000", - "tx_rollup_finality_period": 2000, + "tx_rollup_finality_period": 2000, "tx_rollup_withdraw_period": 60000, "tx_rollup_max_unfinalized_levels": 2100, "sc_rollup_enable": false, "sc_rollup_origination_size": 6314 } diff --git a/tezt/_regressions/rpc/alpha.proxy_server.others.out b/tezt/_regressions/rpc/alpha.proxy_server.others.out index 546b1e53953a..f3bc30f0d165 100644 --- a/tezt/_regressions/rpc/alpha.proxy_server.others.out +++ b/tezt/_regressions/rpc/alpha.proxy_server.others.out @@ -33,7 +33,7 @@ tezt/_regressions/rpc/alpha.proxy_server.others.out "tx_rollup_hard_size_limit_per_inbox": 100000, "tx_rollup_hard_size_limit_per_message": 5000, "tx_rollup_commitment_bond": "10000000000", - "tx_rollup_finality_period": 2000, + "tx_rollup_finality_period": 2000, "tx_rollup_withdraw_period": 60000, "tx_rollup_max_unfinalized_levels": 2100, "sc_rollup_enable": false, "sc_rollup_origination_size": 6314 } diff --git a/tezt/_regressions/tx_rollup_finalize_commitment_future.out b/tezt/_regressions/tx_rollup_finalize_commitment_future.out new file mode 100644 index 000000000000..e8b78fd166e3 --- /dev/null +++ b/tezt/_regressions/tx_rollup_finalize_commitment_future.out @@ -0,0 +1,45 @@ +tezt/_regressions/tx_rollup_finalize_commitment_future.out + +./tezos-client --wait none submit tx rollup batch 626c6f62 to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' +Node is bootstrapped. +Estimated gas: 2257.424 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.000489 + Expected counter: 2 + Gas limit: 2358 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000489 + payload fees(the block proposer) ....... +ꜩ0.000489 + Tx rollup transaction:[TX_ROLLUP_HASH], 4 bytes, From: [PUBLIC_KEY_HASH] + This tx rollup submit operation was successfully applied + Balance updates: + + Consumed gas: 2257.424 + + +./tezos-client --wait none submit tx rollup finalize commitment to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' +Node is bootstrapped. +This simulation failed: + Manager signed operations: + From: [PUBLIC_KEY_HASH] + Fee to the baker: ꜩ0 + Expected counter: 3 + Gas limit: 1040000 + Storage limit: 60000 bytes + Tx rollup finalize commitment:[TX_ROLLUP_HASH] + From: [PUBLIC_KEY_HASH] + This operation FAILED. + +Error: + { "id": "proto.alpha.tx_rollup_no_commitment_to_finalize", + "description": "There is no commitment to finalize", "data": {} } diff --git a/tezt/_regressions/tx_rollup_finalize_commitment_no_batch.out b/tezt/_regressions/tx_rollup_finalize_commitment_no_batch.out new file mode 100644 index 000000000000..1037266852aa --- /dev/null +++ b/tezt/_regressions/tx_rollup_finalize_commitment_no_batch.out @@ -0,0 +1,18 @@ +tezt/_regressions/tx_rollup_finalize_commitment_no_batch.out + +./tezos-client --wait none submit tx rollup finalize commitment to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' +Node is bootstrapped. +This simulation failed: + Manager signed operations: + From: [PUBLIC_KEY_HASH] + Fee to the baker: ꜩ0 + Expected counter: 2 + Gas limit: 1040000 + Storage limit: 60000 bytes + Tx rollup finalize commitment:[TX_ROLLUP_HASH] + From: [PUBLIC_KEY_HASH] + This operation FAILED. + +Error: + { "id": "proto.alpha.tx_rollup_no_commitment_to_finalize", + "description": "There is no commitment to finalize", "data": {} } diff --git a/tezt/_regressions/tx_rollup_finalize_commitment_no_commitment.out b/tezt/_regressions/tx_rollup_finalize_commitment_no_commitment.out new file mode 100644 index 000000000000..76c9943953d8 --- /dev/null +++ b/tezt/_regressions/tx_rollup_finalize_commitment_no_commitment.out @@ -0,0 +1,45 @@ +tezt/_regressions/tx_rollup_finalize_commitment_no_commitment.out + +./tezos-client --wait none submit tx rollup batch 626c6f62 to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' +Node is bootstrapped. +Estimated gas: 2257.424 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.000489 + Expected counter: 2 + Gas limit: 2358 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000489 + payload fees(the block proposer) ....... +ꜩ0.000489 + Tx rollup transaction:[TX_ROLLUP_HASH], 4 bytes, From: [PUBLIC_KEY_HASH] + This tx rollup submit operation was successfully applied + Balance updates: + + Consumed gas: 2257.424 + + +./tezos-client --wait none submit tx rollup finalize commitment to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' +Node is bootstrapped. +This simulation failed: + Manager signed operations: + From: [PUBLIC_KEY_HASH] + Fee to the baker: ꜩ0 + Expected counter: 3 + Gas limit: 1040000 + Storage limit: 60000 bytes + Tx rollup finalize commitment:[TX_ROLLUP_HASH] + From: [PUBLIC_KEY_HASH] + This operation FAILED. + +Error: + { "id": "proto.alpha.tx_rollup_no_commitment_to_finalize", + "description": "There is no commitment to finalize", "data": {} } diff --git a/tezt/_regressions/tx_rollup_finalize_too_recent_commitment.out b/tezt/_regressions/tx_rollup_finalize_too_recent_commitment.out new file mode 100644 index 000000000000..e546d57172cb --- /dev/null +++ b/tezt/_regressions/tx_rollup_finalize_too_recent_commitment.out @@ -0,0 +1,78 @@ +tezt/_regressions/tx_rollup_finalize_too_recent_commitment.out + +./tezos-client --wait none submit tx rollup batch 626c6f62 to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' +Node is bootstrapped. +Estimated gas: 2257.424 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.000489 + Expected counter: 2 + Gas limit: 2358 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000489 + payload fees(the block proposer) ....... +ꜩ0.000489 + Tx rollup transaction:[TX_ROLLUP_HASH], 4 bytes, From: [PUBLIC_KEY_HASH] + This tx rollup submit operation was successfully applied + Balance updates: + + Consumed gas: 2257.424 + + +./tezos-client rpc get '/chains/main/blocks/head/context/tx_rollup/[TX_ROLLUP_HASH]/inbox/0' +{ "contents": [ "M22FciVGoiULYX21PdQPj9Jv5a9rEZeEjRLw4Mi9YTzyENMQdk1" ], + "cumulated_size": 4, + "hash": "i3RQpwA1RgvBitqJGtQkzpNd16N52GSX63WuBh49r2ZkFziPoq5" } + +./tezos-client --wait none submit tx rollup commitment 0 i3RQpwA1RgvBitqJGtQkzpNd16N52GSX63WuBh49r2ZkFziPoq5 726f6f74 to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' +Node is bootstrapped. +Estimated gas: 3280.860 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.000632 + Expected counter: 3 + Gas limit: 3381 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000632 + payload fees(the block proposer) ....... +ꜩ0.000632 + Tx rollup commitment:[TX_ROLLUP_HASH], commitment 0 : batches = 726f6f74 predecessor for inbox i3RQpwA1RgvBitqJGtQkzpNd16N52GSX63WuBh49r2ZkFziPoq5 + From: [PUBLIC_KEY_HASH] + This tx rollup commit operation was successfully applied + Balance updates: + + Consumed gas: 3280.860 + + +./tezos-client --wait none submit tx rollup finalize commitment to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' +Node is bootstrapped. +This simulation failed: + Manager signed operations: + From: [PUBLIC_KEY_HASH] + Fee to the baker: ꜩ0 + Expected counter: 4 + Gas limit: 1040000 + Storage limit: 60000 bytes + Tx rollup finalize commitment:[TX_ROLLUP_HASH] + From: [PUBLIC_KEY_HASH] + This operation FAILED. + +Error: + { "id": "proto.alpha.tx_rollup_no_commitment_to_finalize", + "description": "There is no commitment to finalize", "data": {} } diff --git a/tezt/_regressions/tx_rollup_limit_empty_batch.out b/tezt/_regressions/tx_rollup_limit_empty_batch.out index 74685f917615..261baf5d50a5 100644 --- a/tezt/_regressions/tx_rollup_limit_empty_batch.out +++ b/tezt/_regressions/tx_rollup_limit_empty_batch.out @@ -2,7 +2,7 @@ tezt/_regressions/tx_rollup_limit_empty_batch.out ./tezos-client --wait none submit tx rollup batch to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' Node is bootstrapped. -Estimated gas: 2257.242 units (will add 100 for safety) +Estimated gas: 2257.416 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -24,5 +24,5 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2257.242 + Consumed gas: 2257.416 diff --git a/tezt/_regressions/tx_rollup_limit_maximum_size_batch.out b/tezt/_regressions/tx_rollup_limit_maximum_size_batch.out index 42ae5a199258..6e535deb8e7e 100644 --- a/tezt/_regressions/tx_rollup_limit_maximum_size_batch.out +++ b/tezt/_regressions/tx_rollup_limit_maximum_size_batch.out @@ -2,7 +2,7 @@ tezt/_regressions/tx_rollup_limit_maximum_size_batch.out ./tezos-client --wait none submit tx rollup batch 6262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262 to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' Node is bootstrapped. -Estimated gas: 2268.492 units (will add 100 for safety) +Estimated gas: 2268.666 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -24,7 +24,7 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2268.492 + Consumed gas: 2268.666 ./tezos-client --wait none submit tx rollup batch 636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363 to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' diff --git a/tezt/_regressions/tx_rollup_limit_maximum_size_inbox.out b/tezt/_regressions/tx_rollup_limit_maximum_size_inbox.out index c2c8bfe04bf7..646e6f340513 100644 --- a/tezt/_regressions/tx_rollup_limit_maximum_size_inbox.out +++ b/tezt/_regressions/tx_rollup_limit_maximum_size_inbox.out @@ -2,7 +2,7 @@ tezt/_regressions/tx_rollup_limit_maximum_size_inbox.out ./tezos-client --wait none submit tx rollup batch 6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161 to '[TX_ROLLUP_HASH]' from bootstrap1 Node is bootstrapped. -Estimated gas: 2268.492 units (will add 100 for safety) +Estimated gas: 2268.666 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -24,12 +24,12 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2268.492 + Consumed gas: 2268.666 ./tezos-client --wait none submit tx rollup batch 6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161 to '[TX_ROLLUP_HASH]' from bootstrap2 Node is bootstrapped. -Estimated gas: 2268.492 units (will add 100 for safety) +Estimated gas: 2268.666 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -51,12 +51,12 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2268.492 + Consumed gas: 2268.666 ./tezos-client --wait none submit tx rollup batch 6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161 to '[TX_ROLLUP_HASH]' from bootstrap3 Node is bootstrapped. -Estimated gas: 2268.492 units (will add 100 for safety) +Estimated gas: 2268.666 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -78,12 +78,12 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2268.492 + Consumed gas: 2268.666 ./tezos-client --wait none submit tx rollup batch 6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161 to '[TX_ROLLUP_HASH]' from bootstrap4 Node is bootstrapped. -Estimated gas: 2268.492 units (will add 100 for safety) +Estimated gas: 2268.666 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -105,12 +105,12 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2268.492 + Consumed gas: 2268.666 ./tezos-client --wait none submit tx rollup batch 6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161 to '[TX_ROLLUP_HASH]' from bootstrap5 Node is bootstrapped. -Estimated gas: 2268.492 units (will add 100 for safety) +Estimated gas: 2268.666 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -132,13 +132,13 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2268.492 + Consumed gas: 2268.666 ./tezos-client --wait none submit tx rollup batch 6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161 to '[TX_ROLLUP_HASH]' from bootstrap6 Node is bootstrapped. Estimated storage: no bytes added -Estimated gas: 2268.492 units (will add 100 for safety) +Estimated gas: 2268.666 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -174,13 +174,13 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2268.492 + Consumed gas: 2268.666 ./tezos-client --wait none submit tx rollup batch 6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161 to '[TX_ROLLUP_HASH]' from bootstrap7 Node is bootstrapped. Estimated storage: no bytes added -Estimated gas: 2268.492 units (will add 100 for safety) +Estimated gas: 2268.666 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -216,13 +216,13 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2268.492 + Consumed gas: 2268.666 ./tezos-client --wait none submit tx rollup batch 6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161 to '[TX_ROLLUP_HASH]' from bootstrap8 Node is bootstrapped. Estimated storage: no bytes added -Estimated gas: 2268.492 units (will add 100 for safety) +Estimated gas: 2268.666 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -258,13 +258,13 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2268.492 + Consumed gas: 2268.666 ./tezos-client --wait none submit tx rollup batch 6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161 to '[TX_ROLLUP_HASH]' from bootstrap9 Node is bootstrapped. Estimated storage: no bytes added -Estimated gas: 2268.492 units (will add 100 for safety) +Estimated gas: 2268.666 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -300,13 +300,13 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2268.492 + Consumed gas: 2268.666 ./tezos-client --wait none submit tx rollup batch 6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161 to '[TX_ROLLUP_HASH]' from bootstrap10 Node is bootstrapped. Estimated storage: no bytes added -Estimated gas: 2268.492 units (will add 100 for safety) +Estimated gas: 2268.666 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -342,13 +342,13 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2268.492 + Consumed gas: 2268.666 ./tezos-client --wait none submit tx rollup batch 6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161 to '[TX_ROLLUP_HASH]' from bootstrap11 Node is bootstrapped. Estimated storage: no bytes added -Estimated gas: 2268.492 units (will add 100 for safety) +Estimated gas: 2268.666 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -384,13 +384,13 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2268.492 + Consumed gas: 2268.666 ./tezos-client --wait none submit tx rollup batch 6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161 to '[TX_ROLLUP_HASH]' from bootstrap12 Node is bootstrapped. Estimated storage: no bytes added -Estimated gas: 2268.492 units (will add 100 for safety) +Estimated gas: 2268.666 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -426,13 +426,13 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2268.492 + Consumed gas: 2268.666 ./tezos-client --wait none submit tx rollup batch 6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161 to '[TX_ROLLUP_HASH]' from bootstrap13 Node is bootstrapped. Estimated storage: no bytes added -Estimated gas: 2268.492 units (will add 100 for safety) +Estimated gas: 2268.666 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -468,13 +468,13 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2268.492 + Consumed gas: 2268.666 ./tezos-client --wait none submit tx rollup batch 6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161 to '[TX_ROLLUP_HASH]' from bootstrap14 Node is bootstrapped. Estimated storage: no bytes added -Estimated gas: 2268.492 units (will add 100 for safety) +Estimated gas: 2268.666 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -510,13 +510,13 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2268.492 + Consumed gas: 2268.666 ./tezos-client --wait none submit tx rollup batch 6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161 to '[TX_ROLLUP_HASH]' from bootstrap15 Node is bootstrapped. Estimated storage: no bytes added -Estimated gas: 2268.492 units (will add 100 for safety) +Estimated gas: 2268.666 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -552,13 +552,13 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2268.492 + Consumed gas: 2268.666 ./tezos-client --wait none submit tx rollup batch 6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161 to '[TX_ROLLUP_HASH]' from bootstrap16 Node is bootstrapped. Estimated storage: no bytes added -Estimated gas: 2268.492 units (will add 100 for safety) +Estimated gas: 2268.666 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -594,13 +594,13 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2268.492 + Consumed gas: 2268.666 ./tezos-client --wait none submit tx rollup batch 6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161 to '[TX_ROLLUP_HASH]' from bootstrap17 Node is bootstrapped. Estimated storage: no bytes added -Estimated gas: 2268.492 units (will add 100 for safety) +Estimated gas: 2268.666 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -636,13 +636,13 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2268.492 + Consumed gas: 2268.666 ./tezos-client --wait none submit tx rollup batch 6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161 to '[TX_ROLLUP_HASH]' from bootstrap18 Node is bootstrapped. Estimated storage: no bytes added -Estimated gas: 2268.492 units (will add 100 for safety) +Estimated gas: 2268.666 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -678,13 +678,13 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2268.492 + Consumed gas: 2268.666 ./tezos-client --wait none submit tx rollup batch 6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161 to '[TX_ROLLUP_HASH]' from bootstrap19 Node is bootstrapped. Estimated storage: no bytes added -Estimated gas: 2268.492 units (will add 100 for safety) +Estimated gas: 2268.666 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -720,13 +720,13 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2268.492 + Consumed gas: 2268.666 ./tezos-client --wait none submit tx rollup batch 6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161 to '[TX_ROLLUP_HASH]' from bootstrap20 Node is bootstrapped. Estimated storage: no bytes added -Estimated gas: 2268.492 units (will add 100 for safety) +Estimated gas: 2268.666 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -762,10 +762,10 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2268.492 + Consumed gas: 2268.666 -./tezos-client rpc get '/chains/main/blocks/head/context/tx_rollup/[TX_ROLLUP_HASH]/inbox' +./tezos-client rpc get '/chains/main/blocks/head/context/tx_rollup/[TX_ROLLUP_HASH]/inbox/0' { "contents": [ "M2SteY4EPD6F7Zemc8uwRNTejrvu798dPoKtAMM3LZBtdxEAEVN", "M2SteY4EPD6F7Zemc8uwRNTejrvu798dPoKtAMM3LZBtdxEAEVN", diff --git a/tezt/_regressions/tx_rollup_rpc_commitment.out b/tezt/_regressions/tx_rollup_rpc_commitment.out index c96a5d04d03b..2f42ee9ba102 100644 --- a/tezt/_regressions/tx_rollup_rpc_commitment.out +++ b/tezt/_regressions/tx_rollup_rpc_commitment.out @@ -2,7 +2,7 @@ tezt/_regressions/tx_rollup_rpc_commitment.out ./tezos-client --wait none submit tx rollup batch 626c6f62 to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' Node is bootstrapped. -Estimated gas: 2257.250 units (will add 100 for safety) +Estimated gas: 2257.424 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -24,12 +24,12 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2257.250 + Consumed gas: 2257.424 -./tezos-client --wait none submit tx rollup commitment 3 i3RQpwA1RgvBitqJGtQkzpNd16N52GSX63WuBh49r2ZkFziPoq5 726f6f74 to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' +./tezos-client --wait none submit tx rollup commitment 0 i3RQpwA1RgvBitqJGtQkzpNd16N52GSX63WuBh49r2ZkFziPoq5 726f6f74 to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' Node is bootstrapped. -Estimated gas: 2870.480 units (will add 100 for safety) +Estimated gas: 3280.860 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -40,23 +40,24 @@ 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.000591 + Fee to the baker: ꜩ0.000632 Expected counter: 3 - Gas limit: 2971 + Gas limit: 3381 Storage limit: 0 bytes Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.000591 - payload fees(the block proposer) ....... +ꜩ0.000591 - Tx rollup commitment:[TX_ROLLUP_HASH], commitment 3 : batches = 726f6f74 predecessor for inbox i3RQpwA1RgvBitqJGtQkzpNd16N52GSX63WuBh49r2ZkFziPoq5 + [PUBLIC_KEY_HASH] ... -ꜩ0.000632 + payload fees(the block proposer) ....... +ꜩ0.000632 + Tx rollup commitment:[TX_ROLLUP_HASH], commitment 0 : batches = 726f6f74 predecessor for inbox i3RQpwA1RgvBitqJGtQkzpNd16N52GSX63WuBh49r2ZkFziPoq5 From: [PUBLIC_KEY_HASH] This tx rollup commit operation was successfully applied Balance updates: - Consumed gas: 2870.480 + Consumed gas: 3280.860 -./tezos-client rpc get '/chains/main/blocks/head/context/tx_rollup/[TX_ROLLUP_HASH]/commitment?offset=3' +./tezos-client rpc get '/chains/main/blocks/head/context/tx_rollup/[TX_ROLLUP_HASH]/commitment/0' { "commitment": - { "level": 3, "batches": [ { "root": "726f6f74" } ], "predecessor": null, + { "level": 0, "batches": [ { "root": "726f6f74" } ], "predecessor": null, "inbox_hash": "i3RQpwA1RgvBitqJGtQkzpNd16N52GSX63WuBh49r2ZkFziPoq5" }, - "committer": "[PUBLIC_KEY_HASH]", "submitted_at": 6 } + "commitment_hash": "[TX_ROLLUP_COMMITMENT_HASH]", + "committer": "[PUBLIC_KEY_HASH]", "submitted_at": 5 } diff --git a/tezt/_regressions/tx_rollup_rpc_inbox.out b/tezt/_regressions/tx_rollup_rpc_inbox.out index ebea1dad5ba4..2ac16185b0d5 100644 --- a/tezt/_regressions/tx_rollup_rpc_inbox.out +++ b/tezt/_regressions/tx_rollup_rpc_inbox.out @@ -2,7 +2,7 @@ tezt/_regressions/tx_rollup_rpc_inbox.out ./tezos-client --wait none submit tx rollup batch 626c6f62 to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' Node is bootstrapped. -Estimated gas: 2257.250 units (will add 100 for safety) +Estimated gas: 2257.424 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -24,10 +24,10 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2257.250 + Consumed gas: 2257.424 -./tezos-client rpc get '/chains/main/blocks/head/context/tx_rollup/[TX_ROLLUP_HASH]/inbox' +./tezos-client rpc get '/chains/main/blocks/head/context/tx_rollup/[TX_ROLLUP_HASH]/inbox/0' { "contents": [ "M22FciVGoiULYX21PdQPj9Jv5a9rEZeEjRLw4Mi9YTzyENMQdk1" ], "cumulated_size": 4, "hash": "i3RQpwA1RgvBitqJGtQkzpNd16N52GSX63WuBh49r2ZkFziPoq5" } diff --git a/tezt/_regressions/tx_rollup_rpc_pending_bonded_commitments.out b/tezt/_regressions/tx_rollup_rpc_pending_bonded_commitments.out new file mode 100644 index 000000000000..19f922364c4e --- /dev/null +++ b/tezt/_regressions/tx_rollup_rpc_pending_bonded_commitments.out @@ -0,0 +1,62 @@ +tezt/_regressions/tx_rollup_rpc_pending_bonded_commitments.out + +./tezos-client --wait none submit tx rollup batch 626c6f62 to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' +Node is bootstrapped. +Estimated gas: 2257.424 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.000489 + Expected counter: 2 + Gas limit: 2358 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000489 + payload fees(the block proposer) ....... +ꜩ0.000489 + Tx rollup transaction:[TX_ROLLUP_HASH], 4 bytes, From: [PUBLIC_KEY_HASH] + This tx rollup submit operation was successfully applied + Balance updates: + + Consumed gas: 2257.424 + + +./tezos-client --wait none submit tx rollup commitment 0 i3RQpwA1RgvBitqJGtQkzpNd16N52GSX63WuBh49r2ZkFziPoq5 726f6f74 to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' +Node is bootstrapped. +Estimated gas: 3280.860 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.000632 + Expected counter: 3 + Gas limit: 3381 + Storage limit: 0 bytes + Balance updates: + [PUBLIC_KEY_HASH] ... -ꜩ0.000632 + payload fees(the block proposer) ....... +ꜩ0.000632 + Tx rollup commitment:[TX_ROLLUP_HASH], commitment 0 : batches = 726f6f74 predecessor for inbox i3RQpwA1RgvBitqJGtQkzpNd16N52GSX63WuBh49r2ZkFziPoq5 + From: [PUBLIC_KEY_HASH] + This tx rollup commit operation was successfully applied + Balance updates: + + Consumed gas: 3280.860 + + +./tezos-client rpc get '/chains/main/blocks/head/context/tx_rollup/[TX_ROLLUP_HASH]/pending_bonded_commitments/[PUBLIC_KEY_HASH]' +1 + +./tezos-client rpc get '/chains/main/blocks/head/context/tx_rollup/[TX_ROLLUP_HASH]/pending_bonded_commitments/[PUBLIC_KEY_HASH]' +0 diff --git a/tezt/_regressions/tx_rollup_rpc_state.out b/tezt/_regressions/tx_rollup_rpc_state.out index 2c724c8dd65c..e9c9f437c9bc 100644 --- a/tezt/_regressions/tx_rollup_rpc_state.out +++ b/tezt/_regressions/tx_rollup_rpc_state.out @@ -1,5 +1,6 @@ tezt/_regressions/tx_rollup_rpc_state.out ./tezos-client rpc get '/chains/main/blocks/head/context/tx_rollup/[TX_ROLLUP_HASH]/state' -{ "first_unfinalized_level": null, "unfinalized_level_count": 0, - "burn_per_byte": "0", "inbox_ema": 0, "last_inbox_level": null } +{ "last_removed_commitment_hash": null, "commitment_tail_level": null, + "oldest_inbox_level": null, "commitment_head_level": null, + "head_level": null, "burn_per_byte": "0", "inbox_ema": 0 } diff --git a/tezt/lib_tezos/RPC.ml b/tezt/lib_tezos/RPC.ml index daea7c1f8141..c251dfb6bfd1 100644 --- a/tezt/lib_tezos/RPC.ml +++ b/tezt/lib_tezos/RPC.ml @@ -554,45 +554,29 @@ end module Tx_rollup = struct let sub_path ?(chain = "main") ?(block = "head") ~rollup sub = - ["chains"; chain; "blocks"; block; "context"; "tx_rollup"; rollup; sub] + ["chains"; chain; "blocks"; block; "context"; "tx_rollup"; rollup] @ sub let get_state ?endpoint ?hooks ?chain ?block ~rollup client = - let path = sub_path ?chain ?block ~rollup "state" in + let path = sub_path ?chain ?block ~rollup ["state"] in Client.Spawn.rpc ?endpoint ?hooks GET path client - let get_inbox ?endpoint ?hooks ?chain ?block ~rollup client = - let path = sub_path ?chain ?block ~rollup "inbox" in + let get_inbox ?endpoint ?hooks ?chain ?block ~rollup ~level client = + let path = + sub_path ?chain ?block ~rollup ["inbox"; Format.sprintf "%d" level] + in Client.Spawn.rpc ?endpoint ?hooks GET path client let get_commitment ?endpoint ?hooks ?(chain = "main") ?(block = "head") - ?(offset = 0) ~rollup client = - let path = sub_path ~chain ~block ~rollup "commitment" in - let query_string = [("offset", string_of_int offset)] in - Client.Spawn.rpc ?endpoint ?hooks ~query_string GET path client - - let sub_pkh_path ?(chain = "main") ?(block = "head") ~tx_rollup - ~public_key_hash sub = - [ - "chains"; - chain; - "blocks"; - block; - "context"; - "tx_rollup"; - tx_rollup; - sub; - public_key_hash; - ] + ~rollup ~level client = + let path = + sub_path ~chain ~block ~rollup ["commitment"; Format.sprintf "%d" level] + in + Client.Spawn.rpc ?endpoint ?hooks GET path client let get_pending_bonded_commitments ?endpoint ?hooks ?(chain = "main") - ?(block = "head") ~tx_rollup ~public_key_hash client = + ?(block = "head") ~rollup ~pkh client = let path = - sub_pkh_path - ~chain - ~block - ~tx_rollup - ~public_key_hash - "pending_bonded_commitments" + sub_path ~chain ~block ~rollup ["pending_bonded_commitments"; pkh] in Client.Spawn.rpc ?endpoint ?hooks GET path client end diff --git a/tezt/lib_tezos/RPC.mli b/tezt/lib_tezos/RPC.mli index 96187411d4a4..1de69a9f2945 100644 --- a/tezt/lib_tezos/RPC.mli +++ b/tezt/lib_tezos/RPC.mli @@ -867,24 +867,25 @@ module Tx_rollup : sig Client.t -> JSON.t Process.runnable - (** Call RPC /chain/[chain]/blocks/[block]/context/tx_rollup/[tx_rollup_id]/inbox *) + (** Call RPC /chain/[chain]/blocks/[block]/context/tx_rollup/[tx_rollup_id]/inbox/[level] *) val get_inbox : ?endpoint:Client.endpoint -> ?hooks:Process.hooks -> ?chain:string -> ?block:string -> rollup:string -> + level:int -> Client.t -> JSON.t Process.runnable - (** Call RPC /chain/[chain]/blocks/[block]/context/[rollup_hash]/commitment *) + (** Call RPC /chain/[chain]/blocks/[block]/context/tx_rollup/[rollup_hash]/commitment/[level] *) val get_commitment : ?endpoint:Client.endpoint -> ?hooks:Process.hooks -> ?chain:string -> ?block:string -> - ?offset:int -> rollup:string -> + level:int -> Client.t -> JSON.t Process.runnable @@ -894,8 +895,8 @@ module Tx_rollup : sig ?hooks:Process.hooks -> ?chain:string -> ?block:string -> - tx_rollup:string -> - public_key_hash:string -> + rollup:string -> + pkh:string -> Client.t -> JSON.t Process.runnable end diff --git a/tezt/lib_tezos/client.ml b/tezt/lib_tezos/client.ml index b652d8b00168..fe26bd68f327 100644 --- a/tezt/lib_tezos/client.ml +++ b/tezt/lib_tezos/client.ml @@ -1223,7 +1223,6 @@ module Tx_rollup = struct ~roots ~predecessor ~inbox_hash ~rollup ~src client = let process = let predecessor = Option.value ~default:"" predecessor in - spawn_command ?hooks client @@ -1235,7 +1234,7 @@ module Tx_rollup = struct "commitment"; Int.to_string level; inbox_hash; - Hex.(of_string predecessor |> show); + predecessor; ] @ [ String.concat "!" @@ -1253,6 +1252,73 @@ module Tx_rollup = struct in let parse process = Process.check process in {value = process; run = parse} + + let submit_finalize_commitment ?(wait = "none") ?burn_cap ?storage_limit + ?hooks ~rollup ~src client = + let process = + spawn_command + ?hooks + client + (["--wait"; wait] + @ ["submit"; "tx"; "rollup"; "finalize"; "commitment"] + @ ["to"; rollup; "from"; src] + @ Option.fold + ~none:[] + ~some:(fun burn_cap -> ["--burn-cap"; Tez.to_string burn_cap]) + burn_cap + @ Option.fold + ~none:[] + ~some:(fun s -> ["--storage-limit"; string_of_int s]) + storage_limit) + in + let parse process = Process.check process in + {value = process; run = parse} + + let submit_remove_commitment ?(wait = "none") ?burn_cap ?storage_limit ?hooks + ~rollup ~src client = + let process = + spawn_command + ?hooks + client + (["--wait"; wait] + @ ["submit"; "tx"; "rollup"; "remove"; "commitment"] + @ ["to"; rollup; "from"; src] + @ Option.fold + ~none:[] + ~some:(fun burn_cap -> ["--burn-cap"; Tez.to_string burn_cap]) + burn_cap + @ Option.fold + ~none:[] + ~some:(fun s -> ["--storage-limit"; string_of_int s]) + storage_limit) + in + let parse process = Process.check process in + {value = process; run = parse} + + let submit_rejection ?(wait = "none") ?burn_cap ?storage_limit ?hooks ~level + ~message ~position ~proof ~rollup ~src client = + let process = + spawn_command + ?hooks + client + (["--wait"; wait] + @ ["submit"; "tx"; "rollup"; "reject"; "commitment"] + @ ["at"; "level"; string_of_int level] + @ ["message"; message] + @ ["at"; "position"; string_of_int position] + @ ["with"; "proof"; string_of_bool proof] + @ ["to"; rollup] @ ["from"; src] + @ Option.fold + ~none:[] + ~some:(fun burn_cap -> ["--burn-cap"; Tez.to_string burn_cap]) + burn_cap + @ Option.fold + ~none:[] + ~some:(fun s -> ["--storage-limit"; string_of_int s]) + storage_limit) + in + let parse process = Process.check process in + {value = process; run = parse} end let spawn_show_voting_period ?endpoint client = diff --git a/tezt/lib_tezos/client.mli b/tezt/lib_tezos/client.mli index 40abab7093c9..60f0a77c8a20 100644 --- a/tezt/lib_tezos/client.mli +++ b/tezt/lib_tezos/client.mli @@ -916,6 +916,45 @@ module Tx_rollup : sig src:string -> t -> unit Process.runnable + + (** Run [tezos-client submit tx rollup finalize commitment to from ]. *) + val submit_finalize_commitment : + ?wait:string -> + ?burn_cap:Tez.t -> + ?storage_limit:int -> + ?hooks:Process.hooks -> + rollup:string -> + src:string -> + t -> + unit Process.runnable + + (** Run [tezos-client submit tx rollup remove commitment to from ]. *) + val submit_remove_commitment : + ?wait:string -> + ?burn_cap:Tez.t -> + ?storage_limit:int -> + ?hooks:Process.hooks -> + rollup:string -> + src:string -> + t -> + unit Process.runnable + + (** Run [tezos-client submit tx rollup rejection commitment at level + message at with to + from ]. *) + val submit_rejection : + ?wait:string -> + ?burn_cap:Tez.t -> + ?storage_limit:int -> + ?hooks:Process.hooks -> + level:int -> + message:string -> + position:int -> + proof:bool -> + rollup:string -> + src:string -> + t -> + unit Process.runnable end (** Run [tezos-client show voting period] and return the period name. *) diff --git a/tezt/lib_tezos/rollup.ml b/tezt/lib_tezos/rollup.ml index be6577c85514..d5970226ef0e 100644 --- a/tezt/lib_tezos/rollup.ml +++ b/tezt/lib_tezos/rollup.ml @@ -25,26 +25,35 @@ module Tx_rollup = struct type state = { + oldest_inbox_level : int option; + head_level : (int * int) option; burn_per_byte : int; inbox_ema : int; - last_inbox_level : int option; } type inbox = {cumulated_size : int; contents : string list; hash : string} let get_state ?hooks ~rollup client = let parse json = + let oldest_inbox_level = + JSON.(json |-> "oldest_inbox_level" |> as_opt |> Option.map as_int) + in + let head_level = + JSON.( + json |-> "head_level" |> as_opt + |> Option.map @@ fun x -> + as_list x |> function + | [x; y] -> (as_int x, as_int y) + | _ -> raise (Invalid_argument "Rollup.get_state.parse")) + in let burn_per_byte = JSON.(json |-> "burn_per_byte" |> as_int) in let inbox_ema = JSON.(json |-> "inbox_ema" |> as_int) in - let last_inbox_level = - JSON.(json |-> "last_inbox_level" |> as_opt |> Option.map as_int) - in - {burn_per_byte; inbox_ema; last_inbox_level} + {oldest_inbox_level; head_level; burn_per_byte; inbox_ema} in let runnable = RPC.Tx_rollup.get_state ?hooks ~rollup client in Process.runnable_map parse runnable - let get_inbox ?hooks ~rollup client = + let get_inbox ?hooks ~rollup ~level client = let parse json = let cumulated_size = JSON.(json |-> "cumulated_size" |> as_int) in let contents = @@ -53,19 +62,27 @@ module Tx_rollup = struct let hash = JSON.(json |-> "hash" |> as_string) in {cumulated_size; contents; hash} in - let runnable = RPC.Tx_rollup.get_inbox ?hooks ~rollup client in + let runnable = RPC.Tx_rollup.get_inbox ?hooks ~rollup ~level client in Process.runnable_map parse runnable - let get_commitment ?hooks ?block ?offset ~rollup client = - RPC.Tx_rollup.get_commitment ?hooks ?block ?offset ~rollup client + let get_commitment ?hooks ?block ~rollup ~level client = + RPC.Tx_rollup.get_commitment ?hooks ?block ~rollup ~level client + + let get_pending_bonded_commitments ?hooks ?block ~rollup ~pkh client = + RPC.Tx_rollup.get_pending_bonded_commitments + ?hooks + ?block + ~rollup + ~pkh + client module Check = struct let state : state Check.typ = let open Check in convert - (fun {burn_per_byte; inbox_ema; last_inbox_level} -> - (burn_per_byte, inbox_ema, last_inbox_level)) - (tuple3 int int (option int)) + (fun {head_level; oldest_inbox_level; burn_per_byte; inbox_ema} -> + (head_level, oldest_inbox_level, burn_per_byte, inbox_ema)) + (tuple4 (option (tuple2 int int)) (option int) int int) let inbox : inbox Check.typ = let open Check in @@ -74,4 +91,24 @@ module Tx_rollup = struct (cumulated_size, contents, hash)) (tuple3 int (list string) string) end + + module Parameters = struct + type t = {finality_period : int; withdraw_period : int} + + let default = {finality_period = 60_000; withdraw_period = 60_000} + + let parameter_file ?(parameters = default) protocol = + let args = + [(["tx_rollup_enable"], Some "true")] + @ [ + ( ["tx_rollup_finality_period"], + Some (string_of_int parameters.finality_period) ); + ] + @ [ + ( ["tx_rollup_withdraw_period"], + Some (string_of_int parameters.withdraw_period) ); + ] + in + Protocol.write_parameter_file ~base:(Either.right (protocol, None)) args + end end diff --git a/tezt/lib_tezos/rollup.mli b/tezt/lib_tezos/rollup.mli index 5f37c91d4e0b..3509369c2271 100644 --- a/tezt/lib_tezos/rollup.mli +++ b/tezt/lib_tezos/rollup.mli @@ -25,9 +25,10 @@ module Tx_rollup : sig type state = { + oldest_inbox_level : int option; + head_level : (int * int) option; burn_per_byte : int; inbox_ema : int; - last_inbox_level : int option; } type inbox = {cumulated_size : int; contents : string list; hash : string} @@ -36,13 +37,25 @@ module Tx_rollup : sig ?hooks:Process.hooks -> rollup:string -> Client.t -> state Process.runnable val get_inbox : - ?hooks:Process.hooks -> rollup:string -> Client.t -> inbox Process.runnable + ?hooks:Process.hooks -> + rollup:string -> + level:int -> + Client.t -> + inbox Process.runnable val get_commitment : ?hooks:Process.hooks -> ?block:string -> - ?offset:int -> rollup:string -> + level:int -> + Client.t -> + JSON.t Process.runnable + + val get_pending_bonded_commitments : + ?hooks:Process.hooks -> + ?block:string -> + rollup:string -> + pkh:string -> Client.t -> JSON.t Process.runnable @@ -51,4 +64,12 @@ module Tx_rollup : sig val inbox : inbox Check.typ end + + module Parameters : sig + type t = {finality_period : int; withdraw_period : int} + + val default : t + + val parameter_file : ?parameters:t -> Protocol.t -> string Lwt.t + end end diff --git a/tezt/lib_tezos/tezos_regression.ml b/tezt/lib_tezos/tezos_regression.ml index 45e8647afd90..27eea9cbe613 100644 --- a/tezt/lib_tezos/tezos_regression.ml +++ b/tezt/lib_tezos/tezos_regression.ml @@ -31,6 +31,7 @@ let hooks = ("tz[123]\\w{33}", "[PUBLIC_KEY_HASH]"); ("\\bB\\w{50}\\b", "[BLOCK_HASH]"); ("tru1\\w{33}", "[TX_ROLLUP_HASH]"); + ("toc1\\w{50}\\b", "[TX_ROLLUP_COMMITMENT_HASH]"); ("edpk\\w{50}", "[PUBLIC_KEY]"); ("KT1\\w{33}", "[CONTRACT_HASH]"); ("\\bo\\w{50}\\b", "[OPERATION_HASH]"); diff --git a/tezt/tests/tx_rollup.ml b/tezt/tests/tx_rollup.ml index 929773bf3913..1d098f8e9d62 100644 --- a/tezt/tests/tx_rollup.ml +++ b/tezt/tests/tx_rollup.ml @@ -37,73 +37,93 @@ let hooks = Tezos_regression.hooks module Rollup = Rollup.Tx_rollup +module Parameters = Rollup.Parameters -let parameter_file protocol = - Protocol.write_parameter_file - ~base:(Either.right (protocol, None)) - [(["tx_rollup_enable"], Some "true")] +type t = {node : Node.t; client : Client.t; rollup : string} -let submit_batch ?(src = Constant.bootstrap1.public_key_hash) ~batch ~rollup - client = - Client.Tx_rollup.submit_batch ~hooks ~content:batch ~rollup ~src client +let init_with_tx_rollup ?additional_bootstrap_account_count + ?(parameters = Parameters.default) ~protocol () = + let* parameter_file = Parameters.parameter_file ~parameters protocol in + let* (node, client) = + Client.init_with_protocol + ?additional_bootstrap_account_count + ~parameter_file + `Client + ~protocol + () + in + (* We originate a dumb rollup to be able to generate a paths for + tx_rollups related RPCs. *) + let*! rollup = + Client.Tx_rollup.originate ~src:Constant.bootstrap1.public_key_hash client + in + let* () = Client.bake_for client in + let* _ = Node.wait_for_level node 2 in + return {node; client; rollup} + +let submit_batch ~batch {rollup; client; node} = + let*! () = + Client.Tx_rollup.submit_batch + ~hooks + ~content:batch + ~rollup + ~src:Constant.bootstrap1.public_key_hash + client + in + let current_level = Node.get_level node in + let* () = Client.bake_for client in + let* _ = Node.wait_for_level node (current_level + 1) in + return () + +let submit_commitment ~level ~roots ~inbox_hash ~predecessor + {rollup; client; node} = + let*! () = + Client.Tx_rollup.submit_commitment + ~hooks + ~level + ~roots + ~inbox_hash + ~predecessor + ~rollup + ~src:Constant.bootstrap1.public_key_hash + client + in + let current_level = Node.get_level node in + let* () = Client.bake_for client in + let* _ = Node.wait_for_level node (current_level + 1) in + return () + +let submit_finalize_commitment ?(src = Constant.bootstrap1.public_key_hash) + {rollup; client; node = _} = + Client.Tx_rollup.submit_finalize_commitment ~hooks ~rollup ~src client + +let submit_remove_commitment ?(src = Constant.bootstrap1.public_key_hash) + {rollup; client; node = _} = + Client.Tx_rollup.submit_remove_commitment ~hooks ~rollup ~src client + +let submit_rejection ?(src = Constant.bootstrap1.public_key_hash) ~level + ~message ~position ~proof {rollup; client; node = _} = + Client.Tx_rollup.submit_rejection + ~hooks + ~level + ~message + ~position + ~proof + ~rollup + ~src + client (* This module only registers regressions tests. Those regressions tests should be used to ensure there is no regressions with the various RPCs exported by the tx_rollups. *) module Regressions = struct - type t = {node : Node.t; client : Client.t; rollup : string} - - let init_with_tx_rollup ?additional_bootstrap_account_count ~protocol () = - let* parameter_file = parameter_file protocol in - let* (node, client) = - Client.init_with_protocol - ?additional_bootstrap_account_count - ~parameter_file - `Client - ~protocol - () - in - (* We originate a dumb rollup to be able to generate a paths for - tx_rollups related RPCs. *) - let*! rollup = - Client.Tx_rollup.originate ~src:Constant.bootstrap1.public_key_hash client - in - let* () = Client.bake_for client in - let* _ = Node.wait_for_level node 2 in - return {node; client; rollup} - - let submit_batch_and_bake ~batch {rollup; client; node} = - let*! () = submit_batch ~batch ~rollup client in - let current_level = Node.get_level node in - let* () = Client.bake_for client in - let* _ = Node.wait_for_level node (current_level + 1) in - return () - - let submit_commitment ~level ~roots ~inbox_hash ~predecessor - {rollup; client; node} = - let*! () = - Client.Tx_rollup.submit_commitment - ~hooks - ~level - ~roots - ~inbox_hash - ~predecessor - ~rollup - ~src:Constant.bootstrap1.public_key_hash - client - in - let current_level = Node.get_level node in - let* () = Client.bake_for client in - let* _ = Node.wait_for_level node (current_level + 1) in - return () - module RPC = struct let rpc_state = Protocol.register_regression_test ~__FILE__ ~output_file:"tx_rollup_rpc_state" ~title:"RPC (tx_rollup, regression) - state" - ~tags:["tx_rollup"; "rpc"; "state"] + ~tags:["tx_rollup"; "rpc"] @@ fun protocol -> let* {node = _; client; rollup} = init_with_tx_rollup ~protocol () in let*! _state = Rollup.get_state ~hooks ~rollup client in @@ -113,7 +133,7 @@ module Regressions = struct Protocol.register_regression_test ~__FILE__ ~output_file:"tx_rollup_rpc_inbox" - ~title:"RPC (tx_rollup, regression) - inbox" + ~title:"RPC (tx_rollups, regression) - inbox" ~tags:["tx_rollup"; "rpc"; "inbox"] @@ fun protocol -> let* ({rollup; client; node = _} as state) = @@ -121,48 +141,77 @@ module Regressions = struct in (* The content of the batch does not matter for the regression test. *) let batch = "blob" in - let* () = submit_batch_and_bake ~batch state in - let*! _inbox = Rollup.get_inbox ~hooks ~rollup client in + let* () = submit_batch ~batch state in + let*! _inbox = Rollup.get_inbox ~hooks ~rollup ~level:0 client in unit let rpc_commitment = Protocol.register_regression_test ~__FILE__ ~output_file:"tx_rollup_rpc_commitment" - ~title:"RPC (tx_rollup, regression) - commitment" + ~title:"RPC (tx_rollups, regression) - commitment" ~tags:["tx_rollup"; "rpc"; "commitment"] @@ fun protocol -> - let* ({rollup; client; node} as state) = + let* ({rollup; client; node = _} as state) = init_with_tx_rollup ~protocol () in (* The content of the batch does not matter for the regression test. *) let batch = "blob" in - let* () = submit_batch_and_bake ~batch state in - let batch_level = Node.get_level node in - let*! inbox = Rollup.get_inbox ~rollup client in - (* FIXME https://gitlab.com/tezos/tezos/-/issues/2503 - - we introduce two bakes to ensure the block is finalised. This - should be removed once we do not rely on Tenderbake anymore. *) + let* () = submit_batch ~batch state in + let*! inbox = Rollup.get_inbox ~rollup ~level:0 client in let* () = Client.bake_for client in - let* () = Client.bake_for client in - (* FIXME https://gitlab.com/tezos/tezos/-/issues/2503 + let* () = + submit_commitment + ~level:0 + ~roots:["root"] + ~inbox_hash:inbox.hash + ~predecessor:None + state + in + let*! _commitment = + Rollup.get_commitment ~hooks ~block:"head" ~level:0 ~rollup client + in + unit - At the same time we remove the dependency to Tenderbake for - commitment, we will ensure the root is indeed the root of the - previous inbox. I don't know yet how we will be able to do that - yes, something is missing. *) + let rpc_pending_bonded_commitment = + Protocol.register_regression_test + ~__FILE__ + ~output_file:"tx_rollup_rpc_pending_bonded_commitments" + ~title:"RPC (tx_rollups, regression) - pending bonded commitments" + ~tags:["tx_rollup"; "rpc"; "commitment"; "bond"] + @@ fun protocol -> + let* ({rollup; client; node = _} as state) = + init_with_tx_rollup ~protocol () + in + (* The content of the batch does not matter for the regression test. *) + let batch = "blob" in + let* () = submit_batch ~batch state in + let*! inbox = Rollup.get_inbox ~rollup ~level:0 client in + let* () = Client.bake_for client in let* () = submit_commitment - ~level:batch_level + ~level:0 ~roots:["root"] ~inbox_hash:inbox.hash ~predecessor:None state in - let offset = Node.get_level node - batch_level in let*! _commitment = - Rollup.get_commitment ~hooks ~block:"head" ~offset ~rollup client + Rollup.get_pending_bonded_commitments + ~hooks + ~block:"head" + ~rollup + ~pkh:Constant.bootstrap1.public_key_hash + client + in + (* Use a key which has no commitment. *) + let*! _commitment = + Rollup.get_pending_bonded_commitments + ~hooks + ~block:"head" + ~rollup + ~pkh:Constant.bootstrap2.public_key_hash + client in unit end @@ -182,7 +231,7 @@ module Regressions = struct @@ fun protocol -> let* state = init_with_tx_rollup ~protocol () in let batch = "" in - let* () = submit_batch_and_bake ~batch state in + let* () = submit_batch ~batch state in unit let submit_maximum_size_batch = @@ -194,9 +243,16 @@ module Regressions = struct @@ fun protocol -> let* state = init_with_tx_rollup ~protocol () in let batch = String.make batch_limit 'b' in - let* () = submit_batch_and_bake ~batch state in + let* () = submit_batch ~batch state in let batch = String.make (batch_limit + 1) 'c' in - let*? process = submit_batch ~batch ~rollup:state.rollup state.client in + let*? process = + Client.Tx_rollup.submit_batch + ~hooks + ~content:batch + ~rollup:state.rollup + ~src:Constant.bootstrap1.public_key_hash + state.client + in Process.check_error ~msg: (rex @@ -220,18 +276,25 @@ module Regressions = struct let* () = fold max_batch_number_per_inbox () (fun i () -> let src = Account.bootstrap (i + 1) in - let*! () = submit_batch ~src ~batch ~rollup client in + let*! () = + Client.Tx_rollup.submit_batch + ~hooks + ~content:batch + ~rollup + ~src + client + in unit) in let current_level = Node.get_level node in let* () = Client.bake_for client in let* _ = Node.wait_for_level node (current_level + 1) in let*! {cumulated_size; contents = _; hash = _} = - Rollup.get_inbox ~hooks ~rollup client + Rollup.get_inbox ~hooks ~rollup ~level:0 client in Check.(cumulated_size = inbox_limit) Check.int - ~error_msg:"Unexpected inbox size. Expected %L. Got %R" ; + ~error_msg:"Unexpected inbox size. Expected %R. Got %L" ; unit end @@ -242,14 +305,22 @@ module Regressions = struct ~__FILE__ ~output_file:"tx_rollup_client_submit_batch_invalid_rollup_address" ~title:"Submit a batch to an invalid rollup address should fail" - ~tags:["tx_rollup"; "client"; "fail"] + ~tags:["tx_rollup"; "client"; "fail"; "batch"] @@ fun protocol -> - let* parameter_file = parameter_file protocol in + let* parameter_file = Parameters.parameter_file protocol in let* (_node, client) = Client.init_with_protocol ~parameter_file `Client ~protocol () in let invalid_address = "this is an invalid tx rollup address" in - let*? process = submit_batch ~batch:"" ~rollup:invalid_address client in + let*? process = + Client.Tx_rollup.submit_batch + ~hooks + ~content:"" + ~rollup:invalid_address + ~src:Constant.bootstrap1.public_key_hash + client + in + let* () = Process.check_error ~exit_code:1 @@ -260,23 +331,118 @@ module Regressions = struct process in unit + + let client_submit_finalize_commitment_no_batch = + Protocol.register_regression_test + ~__FILE__ + ~output_file:"tx_rollup_finalize_commitment_no_batch" + ~title:"Submit a finalize commitment operation without batch" + ~tags:["tx_rollup"; "client"; "fail"; "finalize"] + @@ fun protocol -> + let* ({rollup = _; client; node = _} as state) = + init_with_tx_rollup ~protocol () + in + let* () = Client.bake_for client in + let*? process = submit_finalize_commitment state in + Process.check_error + ~exit_code:1 + ~msg:(rex "proto.alpha.tx_rollup_no_commitment_to_finalize") + process + + let client_submit_finalize_commitment_no_commitment = + Protocol.register_regression_test + ~__FILE__ + ~output_file:"tx_rollup_finalize_commitment_no_commitment" + ~title:"Submit a finalize commitment operation without commitment" + ~tags:["tx_rollup"; "client"; "fail"; "finalize"] + @@ fun protocol -> + let* ({rollup = _; client; node = _} as state) = + init_with_tx_rollup ~protocol () + in + (* The content of the batch does not matter for the regression test. *) + let batch = "blob" in + let* () = submit_batch ~batch state in + let* () = Client.bake_for client in + let*? process = submit_finalize_commitment state in + Process.check_error + ~exit_code:1 + ~msg:(rex "proto.alpha.tx_rollup_no_commitment_to_finalize") + process + + let client_submit_finalize_commitment_future = + Protocol.register_regression_test + ~__FILE__ + ~output_file:"tx_rollup_finalize_commitment_future" + ~title: + "Submit a finalize commitment operation for a commitment in the \ + future" + ~tags:["tx_rollup"; "client"; "fail"; "finalize"] + @@ fun protocol -> + let* ({rollup = _; client; node = _} as state) = + init_with_tx_rollup ~protocol () + in + (* The content of the batch does not matter for the regression test. *) + let batch = "blob" in + let* () = submit_batch ~batch state in + let* () = Client.bake_for client in + let*? process = submit_finalize_commitment state in + Process.check_error + ~exit_code:1 + ~msg:(rex "proto.alpha.tx_rollup_no_commitment_to_finalize") + process + + let client_submit_finalize_too_recent_commitment = + Protocol.register_regression_test + ~__FILE__ + ~output_file:"tx_rollup_finalize_too_recent_commitment" + ~title:"Try to finalize a too recent commitment" + ~tags:["tx_rollup"; "client"; "fail"; "finalize"] + @@ fun protocol -> + let* ({rollup; client; node = _} as state) = + init_with_tx_rollup ~protocol () + in + (* The content of the batch does not matter for the regression test. *) + let batch = "blob" in + let* () = submit_batch ~batch state in + let* () = Client.bake_for client in + let*! inbox = Rollup.get_inbox ~hooks ~rollup ~level:0 client in + let* () = + submit_commitment + ~level:0 + ~roots:["root"] + ~inbox_hash:inbox.hash + ~predecessor:None + state + in + let* () = Client.bake_for client in + let*? process = submit_finalize_commitment state in + Process.check_error + ~exit_code:1 + ~msg:(rex "proto.alpha.tx_rollup_no_commitment_to_finalize") + process end - let register ~protocols = + let register protocols = RPC.rpc_state protocols ; RPC.rpc_inbox protocols ; RPC.rpc_commitment protocols ; + RPC.rpc_pending_bonded_commitment protocols ; Limits.submit_empty_batch protocols ; Limits.submit_maximum_size_batch protocols ; Limits.inbox_maximum_size protocols ; - Fail.client_submit_batch_invalid_rollup_address protocols + Fail.client_submit_batch_invalid_rollup_address protocols ; + Fail.client_submit_finalize_commitment_no_batch protocols ; + Fail.client_submit_finalize_commitment_no_commitment protocols ; + Fail.client_submit_finalize_commitment_future protocols ; + Fail.client_submit_finalize_too_recent_commitment protocols end (** To be attached to process whose output needs to be captured by the regression framework. *) let hooks = Tezos_regression.hooks -let submit_three_batches_and_check_size ~rollup node client batches level = +let submit_three_batches_and_check_size ~rollup ~tezos_level ~tx_level node + client batches = let* () = Lwt_list.iter_p (fun (content, src, _) -> @@ -287,7 +453,7 @@ let submit_three_batches_and_check_size ~rollup node client batches level = batches in let* () = Client.bake_for client in - let* _ = Node.wait_for_level node level in + let* _ = Node.wait_for_level node tezos_level in (* Check the inbox has been created, with the expected cumulated size. *) let expected_inbox = Rollup. @@ -301,7 +467,7 @@ let submit_three_batches_and_check_size ~rollup node client batches level = hash = "i3VPWHwmJwHeGv86J3KnKAnFBfyXLB6nvYcwaFdnwwMBePDeo57"; } in - let*! inbox = Rollup.get_inbox ~hooks ~rollup client in + let*! inbox = Rollup.get_inbox ~hooks ~rollup ~level:tx_level client in Check.( ((inbox = expected_inbox) ~error_msg:"Unexpected inbox. Got: %L. Expected: %R.") @@ -314,7 +480,7 @@ let test_submit_batches_in_several_blocks = ~title:"Submit batches in several blocks" ~tags:["tx_rollup"] @@ fun protocol -> - let* parameter_file = parameter_file protocol in + let* parameter_file = Parameters.parameter_file protocol in let* (node, client) = Client.init_with_protocol ~parameter_file `Client ~protocol () in @@ -328,7 +494,13 @@ let test_submit_batches_in_several_blocks = state. *) let*! state = Rollup.get_state ~hooks ~rollup client in let expected_state = - Rollup.{burn_per_byte = 0; inbox_ema = 0; last_inbox_level = None} + Rollup. + { + oldest_inbox_level = None; + head_level = None; + burn_per_byte = 0; + inbox_ema = 0; + } in Check.(state = expected_state) Rollup.Check.state @@ -362,11 +534,23 @@ let test_submit_batches_in_several_blocks = in (* Let’s try once and see if everything goes as expected *) let* () = - submit_three_batches_and_check_size ~rollup node client submission 3 + submit_three_batches_and_check_size + ~rollup + node + client + submission + ~tezos_level:3 + ~tx_level:0 in (* Let’s try to see if we can submit three more batches in the next level *) let* () = - submit_three_batches_and_check_size ~rollup node client submission 3 + submit_three_batches_and_check_size + ~rollup + node + client + submission + ~tezos_level:4 + ~tx_level:1 in unit @@ -377,7 +561,7 @@ let test_submit_from_originated_source = ~title:"Submit from an originated contract should fail" ~tags:["tx_rollup"; "client"] @@ fun protocol -> - let* parameter_file = parameter_file protocol in + let* parameter_file = Parameters.parameter_file protocol in let* (node, client) = Client.init_with_protocol ~parameter_file `Client ~protocol () in @@ -417,7 +601,149 @@ let test_submit_from_originated_source = in unit +let test_rollup_with_two_commitments = + Protocol.register_test + ~__FILE__ + ~title:"Submit 2 batches, commit, finalize and remove the commitments" + ~tags:["tx_rollup"; "commitment"; "batch"] + @@ fun protocol -> + let parameters = Parameters.{finality_period = 1; withdraw_period = 1} in + let* ({rollup; client; node = _} as state) = + init_with_tx_rollup ~parameters ~protocol () + in + let batch = "blob" in + let* () = submit_batch ~batch state in + let* () = Client.bake_for client in + let*! inbox = Rollup.get_inbox ~hooks ~rollup ~level:0 client in + let* () = + submit_commitment + ~level:0 + ~roots:["root"] + ~inbox_hash:inbox.hash + ~predecessor:None + state + in + let* () = + repeat parameters.finality_period (fun () -> Client.bake_for client) + in + let*! () = submit_finalize_commitment state in + (* A second submission just to ensure it can be included into a + block even if it fails. *) + let*! () = + submit_finalize_commitment ~src:Constant.bootstrap2.public_key_hash state + in + let* _ = Client.bake_for client in + let*? process = Rollup.get_inbox ~hooks ~rollup ~level:0 client in + let* () = + Process.check_error ~msg:(rex " No service found at this URL") process + in + let* json = RPC.get_operations client in + let manager_operations = JSON.(json |=> 3 |> as_list) in + Check.(List.length manager_operations = 2) + Check.int + ~error_msg:"Two operations manager expected in the last block" ; + let first_op = List.nth manager_operations 0 in + let second_op = List.nth manager_operations 1 in + let get_status op = + JSON.( + op |-> "contents" |=> 0 |-> "metadata" |-> "operation_result" |-> "status" + |> as_string) + in + let first_op_status = get_status first_op in + let second_op_status = get_status second_op in + Check.(first_op_status = "applied") + Check.string + ~error_msg:"The first operation status expected is %R. Got %L" ; + Check.(second_op_status = "failed") + Check.string + ~error_msg:"The second operation status expected is %R. Got %L" ; + (* let*! _ = Rollup.get_inbox ~rollup ~level:0 client in *) + (* We try to finalize a new commitment but it fails. *) + let*? process = submit_finalize_commitment state in + let* () = + Process.check_error + ~exit_code:1 + ~msg:(rex "proto.alpha.tx_rollup_no_commitment_to_finalize") + process + in + let batch = "blob" in + let* () = submit_batch ~batch state in + let* () = Client.bake_for client in + let*! inbox = Rollup.get_inbox ~hooks ~rollup ~level:1 client in + let*! commitment = Rollup.get_commitment ~hooks ~rollup ~level:0 client in + let* () = Client.bake_for client in + let*! () = + submit_remove_commitment ~src:Constant.bootstrap2.public_key_hash state + in + let* () = Client.bake_for client in + let predecessor = Some JSON.(commitment |-> "commitment_hash" |> as_string) in + let* () = + submit_commitment + ~level:1 + ~roots:["root"] + ~inbox_hash:inbox.hash + ~predecessor + state + in + let* () = + repeat parameters.finality_period (fun () -> Client.bake_for client) + in + let*! () = + submit_finalize_commitment ~src:Constant.bootstrap2.public_key_hash state + in + let*! _inbox = Rollup.get_inbox ~hooks ~rollup ~level:1 client in + let* () = Client.bake_for client in + let*? process = Rollup.get_inbox ~hooks ~rollup ~level:0 client in + let* () = + Process.check_error ~msg:(rex " No service found at this URL") process + in + let*! _commitment = Rollup.get_commitment ~hooks ~rollup ~level:0 client in + let* () = Client.bake_for client in + let*! () = + submit_remove_commitment ~src:Constant.bootstrap2.public_key_hash state + in + let* () = Client.bake_for client in + let*! _commitment = Rollup.get_commitment ~hooks ~rollup ~level:0 client in + let*! _commitment = Rollup.get_commitment ~hooks ~rollup ~level:1 client in + unit + +let test_rollup_last_commitment_is_rejected = + Protocol.register_test + ~__FILE__ + ~title:"reject last commitment" + ~tags:["tx_rollup"; "rejection"; "batch"] + @@ fun protocol -> + let parameters = Parameters.{finality_period = 1; withdraw_period = 1} in + let* ({rollup; client; node = _} as state) = + init_with_tx_rollup ~parameters ~protocol () + in + let batch = "blob" in + let* () = submit_batch ~batch state in + let* () = Client.bake_for client in + let*! inbox = Rollup.get_inbox ~hooks ~rollup ~level:0 client in + let* () = + submit_commitment + ~level:0 + ~roots:["root"] + ~inbox_hash:inbox.hash + ~predecessor:None + state + in + let* () = + repeat parameters.finality_period (fun () -> Client.bake_for client) + in + let*! _ = RPC.Tx_rollup.get_state ~rollup client in + let*! () = + submit_rejection ~level:0 ~message:batch ~position:0 ~proof:true state + in + let* () = Client.bake_for client in + let*! _ = RPC.Tx_rollup.get_state ~rollup client in + let* _ = RPC.get_block client in + unit + let register ~protocols = - Regressions.register ~protocols ; + Regressions.register protocols ; test_submit_batches_in_several_blocks protocols ; - test_submit_from_originated_source protocols + test_submit_from_originated_source protocols ; + test_rollup_with_two_commitments protocols ; + test_rollup_last_commitment_is_rejected protocols diff --git a/tezt/tests/tx_rollup_node.ml b/tezt/tests/tx_rollup_node.ml index 8daa07053d83..2aa74e48849d 100644 --- a/tezt/tests/tx_rollup_node.ml +++ b/tezt/tests/tx_rollup_node.ml @@ -179,7 +179,7 @@ let test_tx_node_store_inbox = let* () = Client.bake_for client in let* _ = Node.wait_for_level node 3 in let* node_inbox = get_node_inbox tx_node in - let*! inbox = Rollup.get_inbox ~hooks ~rollup client in + let*! inbox = Rollup.get_inbox ~hooks ~rollup ~level:0 client in (* Enusre that stored inboxes on daemon side are equivalent of inboxes returned by the rpc call. *) Check.( @@ -210,7 +210,7 @@ let test_tx_node_store_inbox = let* () = Client.bake_for client in let* _ = Node.wait_for_level node 4 in let* node_inbox = get_node_inbox tx_node in - let*! inbox = Rollup.get_inbox ~hooks ~rollup client in + let*! inbox = Rollup.get_inbox ~hooks ~rollup ~level:1 client in (* Enusre that stored inboxes on daemon side are equivalent of inboxes returned by the rpc call. *) assert (Int.equal node_inbox.cumulated_size inbox.cumulated_size) ; -- GitLab