From c812dba2728c644c31fa817cbe5cfe2b622a4511 Mon Sep 17 00:00:00 2001 From: Thomas Letan Date: Wed, 30 Mar 2022 09:42:35 +0200 Subject: [PATCH 01/20] Proto: Fix the storage accounting of the table of tickets --- .../lib_protocol/alpha_context.mli | 10 +++--- src/proto_alpha/lib_protocol/apply.ml | 19 +++++++---- src/proto_alpha/lib_protocol/fees_storage.ml | 10 ++---- src/proto_alpha/lib_protocol/fees_storage.mli | 19 +++++------ src/proto_alpha/lib_protocol/storage.ml | 25 +++++++++++++-- src/proto_alpha/lib_protocol/storage.mli | 6 ++++ .../ticket_balance_migration_for_j.ml | 19 ++++++++--- .../lib_protocol/ticket_storage.ml | 32 ++++++++++++++++++- .../lib_protocol/ticket_storage.mli | 13 ++++++++ tezt/_regressions/tickets/ticket_balance.out | 27 ++++++++++++---- 10 files changed, 137 insertions(+), 43 deletions(-) diff --git a/src/proto_alpha/lib_protocol/alpha_context.mli b/src/proto_alpha/lib_protocol/alpha_context.mli index c39229e56d6e..aeb5664c2c6b 100644 --- a/src/proto_alpha/lib_protocol/alpha_context.mli +++ b/src/proto_alpha/lib_protocol/alpha_context.mli @@ -3345,9 +3345,14 @@ end documentation of the functions there. *) module Ticket_balance : sig + type error += Used_storage_space_underflow + val adjust_balance : context -> Ticket_hash.t -> delta:Z.t -> (Z.t * context) tzresult Lwt.t + val adjust_storage_space : + context -> storage_diff:Z.t -> (Z.t * context) tzresult Lwt.t + val get_balance : context -> Ticket_hash.t -> (Z.t option * context) tzresult Lwt.t end @@ -3426,10 +3431,7 @@ end module Fees : sig val record_paid_storage_space : - context -> - Contract.t -> - ticket_table_size_diff:Z.t -> - (context * Z.t * Z.t) tzresult Lwt.t + context -> Contract.t -> (context * Z.t * Z.t) tzresult Lwt.t val record_global_constant_storage_space : context -> Z.t -> context * Z.t diff --git a/src/proto_alpha/lib_protocol/apply.ml b/src/proto_alpha/lib_protocol/apply.ml index 0d07ccafadda..2c7573e5bc21 100644 --- a/src/proto_alpha/lib_protocol/apply.ml +++ b/src/proto_alpha/lib_protocol/apply.ml @@ -885,8 +885,10 @@ let apply_transaction_to_smart_contract ~ctxt ~source ~contract ~amount ticket_diffs operations >>=? fun (ticket_table_size_diff, ctxt) -> - Fees.record_paid_storage_space ctxt contract ~ticket_table_size_diff - >>=? fun (ctxt, new_size, paid_storage_size_diff) -> + Ticket_balance.adjust_storage_space ctxt ~storage_diff:ticket_table_size_diff + >>=? fun (ticket_paid_storage_diff, ctxt) -> + Fees.record_paid_storage_space ctxt contract + >>=? fun (ctxt, new_size, contract_paid_storage_size_diff) -> Contract.originated_from_current_nonce ~since:before_operation ~until:ctxt >>=? fun originated_contracts -> Lwt.return @@ -906,7 +908,8 @@ let apply_transaction_to_smart_contract ~ctxt ~source ~contract ~amount originated_contracts; consumed_gas = Gas.consumed ~since:before_operation ~until:ctxt; storage_size = new_size; - paid_storage_size_diff; + paid_storage_size_diff = + Z.add contract_paid_storage_size_diff ticket_paid_storage_diff; allocated_destination_contract; }) in @@ -1086,7 +1089,7 @@ let apply_origination ~ctxt ~storage_type ~storage ~unparsed_code ~contract >>=? fun ctxt -> Token.transfer ctxt (`Contract source) (`Contract contract) credit >>=? fun (ctxt, balance_updates) -> - Fees.record_paid_storage_space ctxt contract ~ticket_table_size_diff:Z.zero + Fees.record_paid_storage_space ctxt contract >|=? fun (ctxt, size, paid_storage_size_diff) -> let result = Origination_result @@ -3155,8 +3158,11 @@ let apply_liquidity_baking_subsidy ctxt ~toggle_vote = Fees.record_paid_storage_space ctxt liquidity_baking_cpmm_contract - ~ticket_table_size_diff >>=? fun (ctxt, new_size, paid_storage_size_diff) -> + Ticket_balance.adjust_storage_space + ctxt + ~storage_diff:ticket_table_size_diff + >>=? fun (ticket_paid_storage_diff, ctxt) -> let consumed_gas = Gas.consumed ~since:backtracking_ctxt ~until:ctxt in @@ -3182,7 +3188,8 @@ let apply_liquidity_baking_subsidy ctxt ~toggle_vote = originated_contracts = []; consumed_gas; storage_size = new_size; - paid_storage_size_diff; + paid_storage_size_diff = + Z.add paid_storage_size_diff ticket_paid_storage_diff; allocated_destination_contract = false; }) in diff --git a/src/proto_alpha/lib_protocol/fees_storage.ml b/src/proto_alpha/lib_protocol/fees_storage.ml index 9ebd70f7d199..9a378f8eef8b 100644 --- a/src/proto_alpha/lib_protocol/fees_storage.ml +++ b/src/proto_alpha/lib_protocol/fees_storage.ml @@ -67,18 +67,14 @@ let record_global_constant_storage_space context size = let to_be_paid = Z.add size cost_of_key in (context, to_be_paid) -let record_paid_storage_space ctxt contract ~ticket_table_size_diff = +let record_paid_storage_space ctxt contract = (* Get the new size of the contract's storage. *) Contract_storage.used_storage_space ctxt contract >>=? fun new_storage_size -> - (* The new total size is the new contract size plus the difference in size - of the ticket-balance table. The difference to the ticket balance table - may be negative. *) - let new_total_size = Z.add new_storage_size ticket_table_size_diff in Contract_storage.set_paid_storage_space_and_return_fees_to_pay ctxt contract - new_total_size - >>=? fun (to_be_paid, c) -> return (c, new_total_size, to_be_paid) + new_storage_size + >>=? fun (to_be_paid, c) -> return (c, new_storage_size, to_be_paid) let source_must_exist c src = match src with diff --git a/src/proto_alpha/lib_protocol/fees_storage.mli b/src/proto_alpha/lib_protocol/fees_storage.mli index e6e1b4e4f9e5..d8269da66845 100644 --- a/src/proto_alpha/lib_protocol/fees_storage.mli +++ b/src/proto_alpha/lib_protocol/fees_storage.mli @@ -37,18 +37,15 @@ type error += Storage_limit_too_high (* `Permanent *) val record_global_constant_storage_space : Raw_context.t -> Z.t -> Raw_context.t * Z.t -(** [record_paid_storage_space ctxt contract ~ticket_table_size_diff] updates - the amount of storage consumed by the [contract] and the - [ticket_table_size_diff] which represents the size change to the - ticket-balance table. This total size is considered as accounted for as far - as future payment is concerned. Returns a new context, the total space - consumed by the [contract], and the additional (and unpaid) space consumed - since the last call of this function on this [contract]. *) +(** [record_paid_storage_space ctxt contract] updates the amount of + storage consumed by the [contract]. This total size is considered + as accounted for as far as future payment is concerned. + + Returns a new context, the total space consumed by the [contract], + and the additional (and unpaid) space consumed since the last call + of this function on this [contract]. *) val record_paid_storage_space : - Raw_context.t -> - Contract_repr.t -> - ticket_table_size_diff:Z.t -> - (Raw_context.t * Z.t * Z.t) tzresult Lwt.t + Raw_context.t -> Contract_repr.t -> (Raw_context.t * Z.t * Z.t) tzresult Lwt.t (** [check_storage_limit ctxt ~storage_limit] raises the [Storage_limit_too_high] error iff [storage_limit] is negative or greater the constant diff --git a/src/proto_alpha/lib_protocol/storage.ml b/src/proto_alpha/lib_protocol/storage.ml index 7dd72760ddad..3c76ada84c2f 100644 --- a/src/proto_alpha/lib_protocol/storage.ml +++ b/src/proto_alpha/lib_protocol/storage.ml @@ -1388,10 +1388,31 @@ module Ticket_balance = struct let name = ["ticket_balance"] end - module Sub_context = Make_subcontext (Registered) (Raw_context) (Name) + module Raw_context = Make_subcontext (Registered) (Raw_context) (Name) + + module Paid_storage_space = + Make_single_data_storage (Registered) (Raw_context) + (struct + let name = ["paid_bytes"] + end) + (Encoding.Z) + + module Used_storage_space = + Make_single_data_storage (Registered) (Raw_context) + (struct + let name = ["used_bytes"] + end) + (Encoding.Z) + + module Table_context = + Make_subcontext (Registered) (Raw_context) + (struct + let name = ["table"] + end) + module Index = Make_index (Ticket_hash_repr.Index) module Table = - Make_indexed_carbonated_data_storage (Sub_context) (Index) (Encoding.Z) + Make_indexed_carbonated_data_storage (Table_context) (Index) (Encoding.Z) end module Tx_rollup = struct diff --git a/src/proto_alpha/lib_protocol/storage.mli b/src/proto_alpha/lib_protocol/storage.mli index 0a6e55660b28..d4fc265cc4ac 100644 --- a/src/proto_alpha/lib_protocol/storage.mli +++ b/src/proto_alpha/lib_protocol/storage.mli @@ -580,6 +580,12 @@ module Ticket_balance : sig with type t := Raw_context.t and type key = Ticket_hash_repr.t and type value = Z.t + + module Paid_storage_space : + Single_data_storage with type t := Raw_context.t and type value = Z.t + + module Used_storage_space : + Single_data_storage with type t := Raw_context.t and type value = Z.t end (** Tenderbake *) diff --git a/src/proto_alpha/lib_protocol/ticket_balance_migration_for_j.ml b/src/proto_alpha/lib_protocol/ticket_balance_migration_for_j.ml index e595f431b2fc..957ccda6e9c9 100644 --- a/src/proto_alpha/lib_protocol/ticket_balance_migration_for_j.ml +++ b/src/proto_alpha/lib_protocol/ticket_balance_migration_for_j.ml @@ -31,7 +31,6 @@ let add_ticket_balance contract ctxt ticket = Ticket_balance_key.of_ex_token ctxt ~owner:contract token >>=? fun (hash, ctxt) -> Ticket_balance.adjust_balance ctxt hash ~delta:(Script_int.to_zint amount) - >|=? fun ((_added_size : Z.t), ctxt) -> ctxt let update_contract_tickets ctxt contract = (* We could fetch and parse code and storage separately, and extract tickets @@ -40,7 +39,7 @@ let update_contract_tickets ctxt contract = code, which is required for accessing storage type. *) Contract.get_script ctxt contract >>=? fun (ctxt, script) -> match script with - | None -> return ctxt + | None -> return (Z.zero, ctxt) | Some script -> Script_ir_translator.parse_script ctxt @@ -58,8 +57,10 @@ let update_contract_tickets ctxt contract = storage >>=? fun (tickets, ctxt) -> List.fold_left_es - (add_ticket_balance (Destination.Contract contract)) - ctxt + (fun (acc_size, ctxt) t -> + add_ticket_balance (Destination.Contract contract) ctxt t + >|=? fun (added_size, ctxt) -> (Z.add acc_size added_size, ctxt)) + (Z.zero, ctxt) tickets let is_originated contract = @@ -69,4 +70,12 @@ let init ctxt = Contract.list ctxt >>= fun contracts -> (* Implicit accounts cannot own tickets, so we filter them out. *) let contracts = List.filter is_originated contracts in - List.fold_left_es update_contract_tickets ctxt contracts + List.fold_left_es + (fun (acc_size, ctxt) t -> + update_contract_tickets ctxt t >|=? fun (added_size, ctxt) -> + (Z.add added_size acc_size, ctxt)) + (Z.zero, ctxt) + contracts + >>=? fun (added_size, ctxt) -> + Ticket_balance.adjust_storage_space ctxt ~storage_diff:added_size + >|=? fun (_sponsored_storage, ctxt) -> ctxt diff --git a/src/proto_alpha/lib_protocol/ticket_storage.ml b/src/proto_alpha/lib_protocol/ticket_storage.ml index 7336acd93c81..aeba2b4bdd8b 100644 --- a/src/proto_alpha/lib_protocol/ticket_storage.ml +++ b/src/proto_alpha/lib_protocol/ticket_storage.ml @@ -25,6 +25,7 @@ type error += | Negative_ticket_balance of {key : Ticket_hash_repr.t; balance : Z.t} + | Used_storage_space_underflow let () = let open Data_encoding in @@ -45,7 +46,16 @@ let () = (function | Negative_ticket_balance {key; balance} -> Some (key, balance) | _ -> None) - (fun (key, balance) -> Negative_ticket_balance {key; balance}) + (fun (key, balance) -> Negative_ticket_balance {key; balance}) ; + register_error_kind + `Permanent + ~id:"Used_storage_underflow" + ~title:"Ticket balance used storage underflow" + ~description: + "Attempt to free more bytes than allocated for the tickets balance" + empty + (function Used_storage_space_underflow -> Some () | _ -> None) + (fun () -> Used_storage_space_underflow) let get_balance ctxt key = Storage.Ticket_balance.Table.find ctxt key >|=? fun (ctxt, res) -> (res, ctxt) @@ -79,3 +89,23 @@ let adjust_balance ctxt key ~delta = get_balance ctxt key >>=? fun (res, ctxt) -> let old_balance = Option.value ~default:Z.zero res in set_balance ctxt key (Z.add old_balance delta) + +let adjust_storage_space ctxt ~storage_diff = + if Compare.Z.(storage_diff = Z.zero) then return (Z.zero, ctxt) + else + Storage.Ticket_balance.Used_storage_space.find ctxt >>=? fun used_storage -> + let used_storage = Option.value ~default:Z.zero used_storage in + Storage.Ticket_balance.Paid_storage_space.find ctxt >>=? fun paid_storage -> + let paid_storage = Option.value ~default:Z.zero paid_storage in + let new_used_storage = Z.add used_storage storage_diff in + error_when + Compare.Z.(new_used_storage < Z.zero) + Used_storage_space_underflow + >>?= fun () -> + Storage.Ticket_balance.Used_storage_space.add ctxt new_used_storage + >>= fun ctxt -> + let diff = Z.sub new_used_storage paid_storage in + if Compare.Z.(Z.zero < diff) then + Storage.Ticket_balance.Paid_storage_space.add ctxt new_used_storage + >>= fun ctxt -> return (diff, ctxt) + else return (Z.zero, ctxt) diff --git a/src/proto_alpha/lib_protocol/ticket_storage.mli b/src/proto_alpha/lib_protocol/ticket_storage.mli index 1930ce29a2f8..433f64b85a96 100644 --- a/src/proto_alpha/lib_protocol/ticket_storage.mli +++ b/src/proto_alpha/lib_protocol/ticket_storage.mli @@ -23,6 +23,8 @@ (* *) (*****************************************************************************) +type error += Used_storage_space_underflow + (** [get_balance ctxt key] receives the ticket balance for the given [key] in the context [ctxt]. The [key] represents a ticket content and a ticket creator pair. In case there exists no value for the given [key], @@ -50,3 +52,14 @@ val adjust_balance : Ticket_hash_repr.t -> delta:Z.t -> (Z.t * Raw_context.t) tzresult Lwt.t + +(** [adjust_storage_space ctxt ~storage_diff] updates the used storage space + for the ticket-table according to [storage_diff]. The additional positive + amount of unpaid storage is returned. If no unpaid storage is consumed, + this amount is 0. + + Note that when storage space for the ticket table is released we may later + use that space for free. For this reason, the amount returned may be less + than the given (positive) [storage_diff]. *) +val adjust_storage_space : + Raw_context.t -> storage_diff:Z.t -> (Z.t * Raw_context.t) tzresult Lwt.t diff --git a/tezt/_regressions/tickets/ticket_balance.out b/tezt/_regressions/tickets/ticket_balance.out index c5a9b72fba91..856a33454b7c 100644 --- a/tezt/_regressions/tickets/ticket_balance.out +++ b/tezt/_regressions/tickets/ticket_balance.out @@ -3,17 +3,30 @@ tickets/ticket_balance.out "ticket_balance", [ [ - "ac416953333d9a59b1a1ae19f2781ee1d6b3823b3c594ce525365511772764c3", + "paid_bytes", + "8201" + ], + [ + "table", [ [ - "data", - "01" - ], - [ - "len", - "00000001" + "ac416953333d9a59b1a1ae19f2781ee1d6b3823b3c594ce525365511772764c3", + [ + [ + "data", + "01" + ], + [ + "len", + "00000001" + ] + ] ] ] + ], + [ + "used_bytes", + "8201" ] ] ] -- GitLab From 75d64eb440092e65cf91085d8ccd12f00855be83 Mon Sep 17 00:00:00 2001 From: Sylvain Ribstein Date: Wed, 23 Mar 2022 18:00:57 +0100 Subject: [PATCH 02/20] proto/test: remove format.printf from test --- .../test/integration/operations/test_tx_rollup.ml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) 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 c00381820ce4..830abdf9494d 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 @@ -328,9 +328,7 @@ let print_deposit_arg tx_rollup account = (match account with | `Hash pk -> Format.sprintf "\"%s\"" (Tx_rollup_l2_address.to_b58check pk) | `Raw str -> str) - |> fun x -> - Format.printf "%s\n@?" x ; - x |> Expr.from_string |> lazy_expr + |> fun x -> x |> Expr.from_string |> lazy_expr let assert_ok res = match res with Ok r -> r | Error _ -> assert false @@ -3631,11 +3629,6 @@ module Withdraw = struct let ctxt = Incremental.alpha_ctxt i in wrap_lwt @@ Contract.get_storage ctxt withdraw_contract >>=? fun (_ctxt, found_storage) -> - Format.printf - "found_storage %s" - (match found_storage with - | Some storage -> Expr.to_string storage - | None -> "None") ; let expected_storage = Format.sprintf "(Some (Pair 0x%s (Pair %d %s)))" -- GitLab From 33e1d9ad64f5f204e0b343b44c3a69a004f7b248 Mon Sep 17 00:00:00 2001 From: Sylvain Ribstein Date: Wed, 23 Mar 2022 18:02:48 +0100 Subject: [PATCH 03/20] proto/test: improve helper fct for commitment --- .../lib_protocol/alpha_context.mli | 4 + .../integration/operations/test_tx_rollup.ml | 254 ++++++++++-------- 2 files changed, 152 insertions(+), 106 deletions(-) diff --git a/src/proto_alpha/lib_protocol/alpha_context.mli b/src/proto_alpha/lib_protocol/alpha_context.mli index aeb5664c2c6b..0db7a429804a 100644 --- a/src/proto_alpha/lib_protocol/alpha_context.mli +++ b/src/proto_alpha/lib_protocol/alpha_context.mli @@ -1615,6 +1615,10 @@ module Tx_rollup_state : sig val get_allocated_storage : t -> Z.t val set_allocated_storage : Z.t -> t -> t + + val next_commitment_level : t -> Raw_level.t -> Tx_rollup_level.t tzresult + + val uncommitted_inboxes_count : t -> int end end 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 830abdf9494d..d86df47b7465 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 @@ -336,16 +336,19 @@ let assert_some res = match res with Some r -> r | None -> assert false let raw_level level = assert_ok @@ Raw_level.of_int32 level -(** Create an incomplete (but valid) commitment for a given level. It - is incomplete in the sense that the Merkle roots for each message - are {!Tx_rollup_commitment.empty_l2_context_hash}. In the meantime - provides the list of withdraw in a association list of - [batch_index -> withdraw_list]. Be careful not to provide a too-big - withdraw_list as the construction is expensive *) -let make_incomplete_commitment_for_batch i level tx_rollup withdraw_list = - Context.Tx_rollup.inbox (I i) tx_rollup level >>=? fun metadata -> - List.init ~when_negative_length:[] metadata.inbox_length (fun _ -> - Tx_rollup_commitment.empty_l2_context_hash) +(** Create an incomplete (but valid) commitment for a given level. It is + incomplete in the sense that the Merkle roots for each message are generated + with [Context_hash.hash_string message_index]. In the meantime provides the + list of withdraw in a association list of [batch_index -> withdraw_list]. + Be careful not to provide a too-big withdraw_list as the construction is + expensive *) +let make_incomplete_commitment_for_batch context level tx_rollup withdraw_list = + Context.Tx_rollup.inbox context tx_rollup level >>=? fun metadata -> + let str_for_context_hash = + Data_encoding.Binary.to_string_exn Tx_rollup_inbox.encoding metadata + in + List.init ~when_negative_length:[] metadata.inbox_length (fun i -> + Context_hash.hash_string [str_for_context_hash ^ string_of_int i]) >>?= fun batches_result -> let messages = List.mapi @@ -362,7 +365,7 @@ let make_incomplete_commitment_for_batch i level tx_rollup withdraw_list = (match Tx_rollup_level.pred level with | None -> return_none | Some predecessor_level -> - Context.Tx_rollup.commitment (I i) tx_rollup predecessor_level + Context.Tx_rollup.commitment context tx_rollup predecessor_level >|=? fun commitment_opt -> Option.map (fun Tx_rollup_commitment.Submitted_commitment.{commitment; _} -> @@ -1488,7 +1491,7 @@ let test_commitment_duplication () = >>=? fun operation -> Block.bake ~operation b >>=? fun b -> Incremental.begin_construction b >>=? fun i -> - make_incomplete_commitment_for_batch i Tx_rollup_level.root tx_rollup [] + make_incomplete_commitment_for_batch (I i) Tx_rollup_level.root tx_rollup [] >>=? fun (commitment, _) -> (* Successfully fail to submit a different commitment from contract2 *) let batches2 : Tx_rollup_message_result_hash.t list = @@ -1633,7 +1636,7 @@ let test_storage_burn_for_commitment () = (* test allocated storage size and balance before/after submit commitment *) Incremental.begin_construction b >>=? fun i -> occupied_storage_size (B b) tx_rollup >>=? fun storage_size_before_commit -> - make_incomplete_commitment_for_batch i Tx_rollup_level.root tx_rollup [] + make_incomplete_commitment_for_batch (I i) Tx_rollup_level.root tx_rollup [] >>=? fun (commitment, _) -> Op.tx_rollup_commit (I i) contract tx_rollup commitment >>=? fun op -> Incremental.add_operation i op >>=? fun i -> @@ -1716,7 +1719,7 @@ let test_storage_burn_for_commitment_and_bond () = (* test allocated storage size and balance before/after submit commitment *) Incremental.begin_construction b >>=? fun i -> occupied_storage_size (B b) tx_rollup >>=? fun storage_size_before_commit -> - make_incomplete_commitment_for_batch i Tx_rollup_level.root tx_rollup [] + make_incomplete_commitment_for_batch (I i) Tx_rollup_level.root tx_rollup [] >>=? fun (commitment, _) -> Op.tx_rollup_commit (I i) contract tx_rollup commitment >>=? fun op -> Incremental.add_operation i op >>=? fun i -> @@ -1795,7 +1798,7 @@ let test_commitment_predecessor () = Tx_rollup_commitment_hash.of_bytes_exn (Bytes.of_string "tcu1deadbeefdeadbeefdeadbeefdead") in - make_incomplete_commitment_for_batch i Tx_rollup_level.root tx_rollup [] + make_incomplete_commitment_for_batch (I 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 @@ -1811,7 +1814,7 @@ let test_commitment_predecessor () = Incremental.add_operation i op >>=? fun i -> (* Commitment without predecessor for block with predecessor*) make_incomplete_commitment_for_batch - i + (I i) Tx_rollup_level.(succ root) tx_rollup [] @@ -1907,7 +1910,7 @@ let test_bond_finalization () = | Tx_rollup_errors.Bond_does_not_exist a_pkh1 -> a_pkh1 = pkh1 | _ -> false) >>=? fun i -> - make_incomplete_commitment_for_batch i Tx_rollup_level.root tx_rollup [] + make_incomplete_commitment_for_batch (I 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 -> @@ -1971,7 +1974,7 @@ let test_finalization_edge_cases () = ~expect_failure: (check_proto_error @@ Tx_rollup_errors.No_commitment_to_finalize) >>=? fun _i -> - make_incomplete_commitment_for_batch i (tx_level 0l) tx_rollup [] + make_incomplete_commitment_for_batch (I i) (tx_level 0l) tx_rollup [] >>=? fun (commitment, _) -> Op.tx_rollup_commit (I i) contract1 tx_rollup commitment >>=? fun op -> (* With a commitment, but too soon after the commitment *) @@ -2000,7 +2003,7 @@ let test_too_many_commitments () = let rec make_commitments i level n = if n = 0 then return (i, level) else - make_incomplete_commitment_for_batch i level tx_rollup [] + make_incomplete_commitment_for_batch (I 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 -> @@ -2014,7 +2017,7 @@ let test_too_many_commitments () = Op.tx_rollup_finalize (I i) contract1 tx_rollup >>=? fun op -> Incremental.add_operation i op >>=? fun i -> (* Fail to add a new commitment. *) - make_incomplete_commitment_for_batch i level tx_rollup [] + make_incomplete_commitment_for_batch (I i) level tx_rollup [] >>=? fun (commitment, _) -> Op.tx_rollup_commit (I i) contract1 tx_rollup commitment >>=? fun op -> Incremental.add_operation @@ -2135,7 +2138,7 @@ module Rejection = struct let init_with_valid_commitment () = init_with_bogus_batch () >>=? fun (i, contract1, tx_rollup, level, message) -> - make_incomplete_commitment_for_batch i level tx_rollup [] + make_incomplete_commitment_for_batch (I i) level tx_rollup [] >>=? fun (commitment, _batches_result) -> Op.tx_rollup_commit (I i) contract1 tx_rollup commitment >>=? fun op -> Incremental.add_operation i op >|=? fun i -> @@ -2144,7 +2147,7 @@ module Rejection = struct let init_with_invalid_commitment () = init_with_bogus_batch () >>=? fun (i, contract1, tx_rollup, level, message) -> - make_incomplete_commitment_for_batch i level tx_rollup [] + make_incomplete_commitment_for_batch (I i) level tx_rollup [] >>=? fun (commitment, _batches_result) -> let commitment = { @@ -2285,12 +2288,15 @@ module Rejection = struct return Tx_rollup_commitment.{commitment with messages = results} (** Produce an invalid commitment with {!make_incomplete_commitment_for_batch}, - then changes the Merkle roots for each message result. *) - let make_valid_commitment_for_messages ~i ~level ~tx_rollup + then changes the Merkle roots for each message result. + + FIXME/TORU: it is not perfectly valid, the withdrawals are still missing. + see {!replace_commitment} documentation. *) + let make_valid_commitment_for_messages ctxt ~level ~tx_rollup ?(withdrawals = []) ~store messages = - make_incomplete_commitment_for_batch i level tx_rollup withdrawals + make_incomplete_commitment_for_batch ctxt level tx_rollup withdrawals >>=? fun (commitment, _) -> - l2_parameters (I i) >>=? fun l2_parameters -> + l2_parameters ctxt >>=? fun l2_parameters -> replace_commitment ~l2_parameters ~commitment ~store messages >>= fun commitment -> return commitment @@ -2342,7 +2348,7 @@ module Rejection = struct in Incremental.begin_construction b >>=? fun i -> make_valid_commitment_for_messages - ~i + (I i) ~level:Tx_rollup_level.root ~tx_rollup ~store @@ -2452,7 +2458,7 @@ module Rejection = struct (* Make an invalid commitment for the submitted transfer *) let level = Tx_rollup_level.(succ root) in Incremental.begin_construction b >>=? fun i -> - make_incomplete_commitment_for_batch i level tx_rollup [] + make_incomplete_commitment_for_batch (I i) level tx_rollup [] >>=? fun (commitment, _) -> Op.tx_rollup_commit (I i) account tx_rollup commitment >>=? fun op -> Incremental.add_operation i op >>=? fun i -> @@ -2502,7 +2508,7 @@ module Rejection = struct (* Make an invalid commitment for the submitted transfer *) let level = Tx_rollup_level.(succ root) in Incremental.begin_construction b >>=? fun i -> - make_valid_commitment_for_messages ~i ~level ~tx_rollup ~store [message] + make_valid_commitment_for_messages (I i) ~level ~tx_rollup ~store [message] >>=? fun commitment -> Op.tx_rollup_commit (I i) account tx_rollup commitment >>=? fun op -> Incremental.add_operation i op >>=? fun i -> @@ -2561,7 +2567,7 @@ module Rejection = struct (* Make an invalid commitment for the submitted transfer *) let level = Tx_rollup_level.(succ root) in Incremental.begin_construction b >>=? fun i -> - make_incomplete_commitment_for_batch i level tx_rollup [] + make_incomplete_commitment_for_batch (I i) level tx_rollup [] >>=? fun (commitment, _) -> Op.tx_rollup_commit (I i) account tx_rollup commitment >>=? fun op -> Incremental.add_operation i op >>=? fun i -> @@ -2746,7 +2752,7 @@ module Rejection = struct Incremental.finalize_block i >>=? fun b -> Incremental.begin_construction b >>=? fun i -> let level2 = Tx_rollup_level.succ level in - make_incomplete_commitment_for_batch i level2 tx_rollup [] + make_incomplete_commitment_for_batch (I i) level2 tx_rollup [] >>=? fun (commitment2, _) -> Op.tx_rollup_commit (I i) contract tx_rollup commitment2 >>=? fun op -> Incremental.add_operation i op >>=? fun i -> @@ -2895,7 +2901,7 @@ module Rejection = struct | Ok path -> path in Incremental.begin_construction b >>=? fun i -> - make_incomplete_commitment_for_batch i Tx_rollup_level.root tx_rollup [] + make_incomplete_commitment_for_batch (I i) Tx_rollup_level.root tx_rollup [] >>=? fun (commitment, _) -> Op.tx_rollup_commit (I i) account tx_rollup commitment >>=? fun op -> Incremental.add_operation i op >>=? fun i -> @@ -2985,7 +2991,7 @@ module Rejection = struct in Incremental.begin_construction b >>=? fun i -> make_valid_commitment_for_messages - ~i + (I i) ~level:Tx_rollup_level.root ~tx_rollup ~store @@ -3050,7 +3056,7 @@ module Rejection = struct in Incremental.begin_construction b >>=? fun i -> let level = Tx_rollup_level.root in - make_valid_commitment_for_messages ~i ~level ~store ~tx_rollup [deposit] + make_valid_commitment_for_messages (I i) ~level ~store ~tx_rollup [deposit] >>=? fun commitment -> Op.tx_rollup_commit (I i) account tx_rollup commitment >>=? fun op -> Incremental.add_operation i op >>=? fun i -> @@ -3458,37 +3464,60 @@ module Withdraw = struct return (account1, account2, tx_rollup, deposit_contract, withdraw_contract, b) - (** [context_finalize_batch_with_withdrawals account tx_rollup batch withdrawals b] - submits a batch containing the message [batch] to [tx_rollup] in the block [b]. - In the following block, it adds a commitment for that block containing - [withdrawals] (same format as in [make_incomplete_commitment_for_batch]). - In the third and final block, it finalizes the commitment. + (** [finalize_all_commitment_with_withdrawals ~account ~tx_rollup ~withdrawals + b] commit and finalize all uncommitted inboxes for a tx_rollup and a + commitment containing [withdrawals] for the last unfinalized commitments + (same format as in [make_incomplete_commitment_for_batch]). - It returns the commitment and a list of dummy context hashes - that was mocked as the result of the applying the batch. - *) - let context_finalize_batch_with_withdrawals ~account ~tx_rollup - ?(batch = "batch") ~withdrawals b = - Op.tx_rollup_submit_batch (B b) account tx_rollup batch - >>=? fun operation -> - Block.bake ~operation b >>=? fun b -> - (* Make a commitment for the dummy batch. Mock the - list of withdrawals as per - [withdrawals]. Include the commitment in an operation and bake. *) - Incremental.begin_construction b >>=? fun i -> + It returns the commitment and a list of dummy context hashes for the last + inboxes committed. *) + let finalize_all_commitment_with_withdrawals ~account ~tx_rollup ~withdrawals + b = + Context.get_level (B b) >>?= fun current_level -> + Context.Tx_rollup.state (B b) tx_rollup >>=? fun state -> + wrap + @@ Alpha_context.Tx_rollup_state.Internal_for_tests.next_commitment_level + state + current_level + >>?= fun next_commitment_level -> + let uncommitted_inboxes = + Alpha_context.Tx_rollup_state.Internal_for_tests.uncommitted_inboxes_count + state + in + let uncommitted_inboxes = max 0 (uncommitted_inboxes - 1) in + let rec aux b committed_inbox next_commitment_level = + if committed_inbox >= uncommitted_inboxes then + return (b, next_commitment_level) + else + (* Make a commitment for the dummy batch. Mock the list of withdrawals as + per [withdrawals]. Include the commitment in an operation and bake. *) + make_incomplete_commitment_for_batch + (B b) + next_commitment_level + tx_rollup + [] + >>=? fun (commitment, _context_hash_list) -> + Op.tx_rollup_commit (B b) account tx_rollup commitment + >>=? fun operation -> + Block.bake ~operation b >>=? fun b -> + (* 3. Finalize the commitment *) + Op.tx_rollup_finalize (B b) account tx_rollup >>=? fun operation -> + Block.bake ~operation b >>=? fun b -> + aux b (committed_inbox + 1) (Tx_rollup_level.succ next_commitment_level) + in + aux b 0 next_commitment_level >>=? fun (b, next_commitment_level) -> make_incomplete_commitment_for_batch - i - Tx_rollup_level.root + (B b) + next_commitment_level tx_rollup withdrawals >>=? fun (commitment, context_hash_list) -> - Op.tx_rollup_commit (I i) account tx_rollup commitment >>=? fun operation -> - Incremental.add_operation i operation >>=? fun i -> - Incremental.finalize_block i >>=? fun b -> + Op.tx_rollup_commit (B b) account tx_rollup commitment >>=? fun operation -> + Block.bake ~operation b >>=? fun b -> (* 3. Finalize the commitment *) Op.tx_rollup_finalize (B b) account tx_rollup >>=? fun operation -> Block.bake ~operation b >>=? fun b -> - return (commitment, context_hash_list, b) + return (commitment, context_hash_list, next_commitment_level, b) (** [test_valid_withdraw] checks that a smart contract can deposit tickets to a transaction rollup. *) @@ -3573,12 +3602,12 @@ module Withdraw = struct (* 2 Add a batch message to [b], a commitment for that inbox containing the withdrawal at index 0, and finalize that commitment *) - context_finalize_batch_with_withdrawals + finalize_all_commitment_with_withdrawals ~account:account1 ~tx_rollup ~withdrawals:[(0, [withdraw1; withdraw2])] block - >>=? fun (_commitment, context_hash_list, block) -> + >>=? fun (_commitment, context_hash_list, committed_level, block) -> (* -- At this point, everything is in place for the user to execute the withdrawal -- *) @@ -3602,7 +3631,7 @@ module Withdraw = struct (B block) ~source:account1 tx_rollup - Tx_rollup_level.root + committed_level ~context_hash ~contents:(Script.lazy_expr Nat_ticket.contents) ~ty:(Script.lazy_expr Nat_ticket.ty) @@ -3798,12 +3827,12 @@ module Withdraw = struct ~claimer:account1 tx_rollup >>=? fun withdraw -> - context_finalize_batch_with_withdrawals + finalize_all_commitment_with_withdrawals ~account:account1 ~tx_rollup ~withdrawals:[(0, [])] b - >>=? fun (_commitment, context_hash_list, b) -> + >>=? fun (_commitment, context_hash_list, committed_level, b) -> Incremental.begin_construction b >>=? fun i -> (let entrypoint = Entrypoint.default in let context_hash = @@ -3823,7 +3852,7 @@ module Withdraw = struct (I i) ~source:account1 tx_rollup - Tx_rollup_level.root + committed_level ~context_hash ~message_index:0 ~contents:(Script.lazy_expr Nat_ticket.contents) @@ -3858,12 +3887,12 @@ module Withdraw = struct ~claimer:account1 tx_rollup >>=? fun withdraw -> - context_finalize_batch_with_withdrawals + finalize_all_commitment_with_withdrawals ~account:account1 ~tx_rollup ~withdrawals:[(0, [withdraw])] b - >>=? fun (_commitment, context_hash_list, b) -> + >>=? fun (_commitment, context_hash_list, committed_level, b) -> (* Try executing the withdrawal with invalid amounts *) let entrypoint = Entrypoint.default in let context_hash = @@ -3886,7 +3915,7 @@ module Withdraw = struct (I i) ~source:account1 tx_rollup - Tx_rollup_level.root + committed_level ~context_hash ~message_index:0 ~contents:(Script.lazy_expr Nat_ticket.contents) @@ -3920,7 +3949,7 @@ module Withdraw = struct (I i) ~source:account1 tx_rollup - Tx_rollup_level.root + committed_level ~context_hash ~message_index:0 ~contents:(Script.lazy_expr Nat_ticket.contents) @@ -4028,12 +4057,12 @@ module Withdraw = struct let withdrawal2 : Tx_rollup_withdraw.t = {withdrawal1 with amount = Tx_rollup_l2_qty.of_int64_exn 5L} in - context_finalize_batch_with_withdrawals + finalize_all_commitment_with_withdrawals ~account:account1 ~tx_rollup ~withdrawals:[(0, [withdrawal1; withdrawal2])] b - >>=? fun (_commitment, context_hash_list, b) -> + >>=? fun (_commitment, context_hash_list, committed_level, b) -> let entrypoint = Entrypoint.default in let context_hash = WithExceptions.Option.get ~loc:__LOC__ @@ List.nth context_hash_list 0 @@ -4055,7 +4084,7 @@ module Withdraw = struct (I i) ~source:account1 tx_rollup - Tx_rollup_level.root + committed_level ~context_hash ~message_index:0 ~contents:(Script.lazy_expr Nat_ticket.contents) @@ -4117,12 +4146,12 @@ module Withdraw = struct ~claimer:account1 tx_rollup >>=? fun withdraw -> - context_finalize_batch_with_withdrawals + finalize_all_commitment_with_withdrawals ~account:account1 ~tx_rollup ~withdrawals:[(0, [withdraw])] b - >>=? fun (_commitment, context_hash_list, b) -> + >>=? fun (_commitment, context_hash_list, committed_level, b) -> let entrypoint = Entrypoint.default in let context_hash = WithExceptions.Option.get ~loc:__LOC__ @@ List.nth context_hash_list 0 @@ -4140,7 +4169,7 @@ module Withdraw = struct (B b) ~source:account1 tx_rollup - Tx_rollup_level.root + committed_level ~context_hash ~contents:(Script.lazy_expr Nat_ticket.contents) ~ty:(Script.lazy_expr Nat_ticket.ty) @@ -4160,7 +4189,7 @@ module Withdraw = struct (I i) ~source:account1 tx_rollup - Tx_rollup_level.root + committed_level ~context_hash ~contents:(Script.lazy_expr Nat_ticket.contents) ~ty:(Script.lazy_expr Nat_ticket.ty) @@ -4200,12 +4229,12 @@ module Withdraw = struct tx_rollup >>=? fun withdraw2 -> let withdraws = [withdraw1; withdraw2] in - context_finalize_batch_with_withdrawals + finalize_all_commitment_with_withdrawals ~account:account1 ~tx_rollup ~withdrawals:[(0, withdraws)] b - >>=? fun (_commitment, context_hash_list, b) -> + >>=? fun (_commitment, context_hash_list, committed_level, b) -> let entrypoint = Entrypoint.default in let context_hash = WithExceptions.Option.get ~loc:__LOC__ @@ List.nth context_hash_list 0 @@ -4217,7 +4246,7 @@ module Withdraw = struct (B b) ~source:account1 tx_rollup - Tx_rollup_level.root + committed_level ~context_hash ~contents:(Script.lazy_expr Nat_ticket.contents) ~ty:(Script.lazy_expr Nat_ticket.ty) @@ -4279,7 +4308,7 @@ module Withdraw = struct >>=? fun withdraw2 -> Incremental.begin_construction b >>=? fun i -> (* 2. Create a commitment *) - make_incomplete_commitment_for_batch i Tx_rollup_level.root tx_rollup [] + make_incomplete_commitment_for_batch (I i) Tx_rollup_level.root tx_rollup [] >>=? fun (commitment, _) -> Op.tx_rollup_commit (I i) account1 tx_rollup commitment >>=? fun operation -> @@ -4295,7 +4324,7 @@ module Withdraw = struct Incremental.begin_construction b >>=? fun i -> (* 2. Create a commitment *) make_incomplete_commitment_for_batch - i + (I i) (tx_level 1l) tx_rollup [(0, [withdraw1]); (1, [withdraw2])] @@ -4395,12 +4424,12 @@ module Withdraw = struct ~claimer:account1 tx_rollup >>=? fun withdraw -> - context_finalize_batch_with_withdrawals + finalize_all_commitment_with_withdrawals ~account:account1 ~tx_rollup ~withdrawals:[(0, [withdraw])] b - >>=? fun (_commitment, context_hash_list, b) -> + >>=? fun (_commitment, context_hash_list, committed_level, b) -> let entrypoint = Entrypoint.default in let context_hash = WithExceptions.Option.get ~loc:__LOC__ @@ List.nth context_hash_list 0 @@ -4420,7 +4449,7 @@ module Withdraw = struct (* The source of the withdrawal execution is not the recipient set in [withdraw] *) ~source:account2 tx_rollup - Tx_rollup_level.root + committed_level ~context_hash ~contents:(Script.lazy_expr Nat_ticket.contents) ~ty:(Script.lazy_expr Nat_ticket.ty) @@ -4462,12 +4491,12 @@ module Withdraw = struct ~claimer:account1 tx_rollup >>=? fun withdraw -> - context_finalize_batch_with_withdrawals + finalize_all_commitment_with_withdrawals ~account:account1 ~tx_rollup ~withdrawals:[(0, [withdraw])] b - >>=? fun (_commitment, context_hash_list, b) -> + >>=? fun (_commitment, context_hash_list, committed_level, b) -> let entrypoint = Entrypoint.default in let context_hash = WithExceptions.Option.get ~loc:__LOC__ @@ List.nth context_hash_list 0 @@ -4485,7 +4514,7 @@ module Withdraw = struct (I i) ~source:account1 tx_rollup - Tx_rollup_level.root + committed_level ~context_hash ~contents:(Script.lazy_expr Nat_ticket.contents) ~ty:(Script.lazy_expr Nat_ticket.ty) @@ -4519,12 +4548,12 @@ module Withdraw = struct ~claimer:account1 tx_rollup >>=? fun withdraw -> - context_finalize_batch_with_withdrawals + finalize_all_commitment_with_withdrawals ~account:account1 ~tx_rollup ~withdrawals:[(0, [withdraw])] b - >>=? fun (_commitment, context_hash_list, b) -> + >>=? fun (_commitment, context_hash_list, committed_level, b) -> let inexistant_entrypoint = Entrypoint.of_string_strict_exn "foobar" in let context_hash = WithExceptions.Option.get ~loc:__LOC__ @@ List.nth context_hash_list 0 @@ -4542,7 +4571,7 @@ module Withdraw = struct (I i) ~source:account1 tx_rollup - Tx_rollup_level.root + committed_level ~context_hash ~contents:(Script.lazy_expr Nat_ticket.contents) ~ty:(Script.lazy_expr Nat_ticket.ty) @@ -4596,7 +4625,7 @@ module Withdraw = struct it. *) Incremental.begin_construction b >>=? fun i -> make_incomplete_commitment_for_batch - i + (I i) Tx_rollup_level.root tx_rollup [(0, [withdraw])] @@ -4663,12 +4692,12 @@ module Withdraw = struct ~claimer:account1 tx_rollup >>=? fun withdraw -> - context_finalize_batch_with_withdrawals + finalize_all_commitment_with_withdrawals ~account:account1 ~tx_rollup ~withdrawals:[(0, [withdraw])] b - >>=? fun (_commitment, context_hash_list, b) -> + >>=? fun (_commitment, context_hash_list, committed_level, b) -> (* Remove the commitment *) Op.tx_rollup_remove_commitment (B b) account1 tx_rollup >>=? fun operation -> @@ -4692,7 +4721,7 @@ module Withdraw = struct (B b) ~source:account1 tx_rollup - Tx_rollup_level.root + committed_level ~context_hash ~contents:(Script.lazy_expr Nat_ticket.contents) ~ty:(Script.lazy_expr Nat_ticket.ty) @@ -4726,13 +4755,13 @@ module Withdraw = struct let open Error_monad_operators in context_init1_withdraw () >>=? fun (account1, tx_rollup, deposit_contract, withdraw_contract, b) -> - let assert_consumed b ~msg consumed_expected = + let assert_consumed b ~msg committed_level consumed_expected = Incremental.begin_construction b >>=? fun i -> let ctxt = Incremental.alpha_ctxt i in Alpha_context.Tx_rollup_withdraw.mem ctxt tx_rollup - Tx_rollup_level.root + committed_level ~message_index:0 ~withdraw_position:0 >>=?? fun (consumed_actual, _) -> @@ -4746,13 +4775,17 @@ module Withdraw = struct ~claimer:account1 tx_rollup >>=? fun withdraw -> - context_finalize_batch_with_withdrawals + finalize_all_commitment_with_withdrawals ~account:account1 ~tx_rollup ~withdrawals:[(0, [withdraw])] b - >>=? fun (_commitment, context_hash_list, b) -> - assert_consumed b ~msg:"should not be consumed before withdrawal" false + >>=? fun (_commitment, context_hash_list, committed_level, b) -> + assert_consumed + b + ~msg:"should not be consumed before withdrawal" + committed_level + false >>=? fun () -> (* Exexute with withdrawal *) (let entrypoint = Entrypoint.default in @@ -4787,7 +4820,11 @@ module Withdraw = struct entrypoint) >>=? fun operation -> Block.bake ~operation b >>=? fun b -> - assert_consumed b ~msg:"should be consumed after withdrawal" true + assert_consumed + b + ~msg:"should be consumed after withdrawal" + committed_level + true >>=? fun () -> (* Remove the commitment *) Op.tx_rollup_remove_commitment (B b) account1 tx_rollup @@ -4795,6 +4832,7 @@ module Withdraw = struct Block.bake ~operation b >>=? fun b -> assert_consumed b + committed_level ~msg:"consumtion memory should be removed with commitment" false >>=? fun () -> return_unit @@ -4802,11 +4840,11 @@ module Withdraw = struct (** Confirm that executing a deposit message produces the correct withdraws. In order to check that the withdrawals are actually correct, we fail to reject them. *) - let make_and_check_correct_commitment i tx_rollup account store message level - withdrawals ~previous_message_result = - make_incomplete_commitment_for_batch i level tx_rollup withdrawals + let make_and_check_correct_commitment ctxt tx_rollup account store message + level withdrawals ~previous_message_result = + make_incomplete_commitment_for_batch ctxt level tx_rollup withdrawals >>=? fun (commitment, _) -> - l2_parameters (I i) >>=? fun l2_parameters -> + l2_parameters ctxt >>=? fun l2_parameters -> Rejection.make_proof store l2_parameters message >>= fun proof -> let after = match proof.after with `Value hash -> hash | `Node hash -> hash @@ -4828,7 +4866,11 @@ module Withdraw = struct Tx_rollup_commitment.hash_message_result message_result in let commitment = {commitment with messages = [message_result_hash]} in - Op.tx_rollup_commit (I i) account tx_rollup commitment >>=? fun operation -> + Op.tx_rollup_commit ctxt account tx_rollup commitment >>=? fun operation -> + (match ctxt with + | B b -> Incremental.begin_construction b + | I i -> return i) + >>=? fun i -> Incremental.add_operation i operation >>=? fun i -> Incremental.finalize_block i >>=? fun b -> Incremental.begin_construction b >>=? fun i -> @@ -4904,7 +4946,7 @@ module Withdraw = struct Rejection.init_l2_store () >>= fun store -> (* For the first deposit, we have no withdraws *) make_and_check_correct_commitment - i + (I i) tx_rollup account1 store @@ -4921,7 +4963,7 @@ module Withdraw = struct Rejection.commit_store store >>= fun store -> (* For the second deposit, we have one. *) make_and_check_correct_commitment - i + (I i) tx_rollup account1 store @@ -4935,7 +4977,7 @@ module Withdraw = struct Rejection.commit_store store >>= fun store -> (* For the third deposit, we have one. *) make_and_check_correct_commitment - i + (I i) tx_rollup account1 store -- GitLab From 36e9c41042e1879c2bcd8e9e0257696e4e60bb86 Mon Sep 17 00:00:00 2001 From: Sylvain Ribstein Date: Wed, 23 Mar 2022 12:08:11 +0100 Subject: [PATCH 04/20] proto: move Contract before Tx_rollup in alpha_ctxt --- src/proto_alpha/lib_protocol/alpha_context.ml | 6 +- .../lib_protocol/alpha_context.mli | 234 +++++++++--------- .../test/integration/test_frozen_bonds.ml | 2 +- 3 files changed, 124 insertions(+), 118 deletions(-) diff --git a/src/proto_alpha/lib_protocol/alpha_context.ml b/src/proto_alpha/lib_protocol/alpha_context.ml index ed0c40bb8c33..7e0628001977 100644 --- a/src/proto_alpha/lib_protocol/alpha_context.ml +++ b/src/proto_alpha/lib_protocol/alpha_context.ml @@ -377,7 +377,11 @@ module Sapling = struct end end -module Bond_id = Bond_id_repr +module Bond_id = struct + include Bond_id_repr + module Internal_for_tests = Contract_storage +end + module Receipt = Receipt_repr module Delegate = struct diff --git a/src/proto_alpha/lib_protocol/alpha_context.mli b/src/proto_alpha/lib_protocol/alpha_context.mli index 0db7a429804a..f718ee752753 100644 --- a/src/proto_alpha/lib_protocol/alpha_context.mli +++ b/src/proto_alpha/lib_protocol/alpha_context.mli @@ -1495,6 +1495,117 @@ module Ticket_hash : sig end end +module Contract : sig + include BASIC_DATA + + type contract = t + + val in_memory_size : t -> Cache_memory_helpers.sint + + val rpc_arg : contract RPC_arg.arg + + val to_b58check : contract -> string + + val of_b58check : string -> contract tzresult + + val implicit_contract : public_key_hash -> contract + + val is_implicit : contract -> public_key_hash option + + val is_originated : contract -> Contract_hash.t option + + val exists : context -> contract -> bool tzresult Lwt.t + + val must_exist : context -> contract -> unit tzresult Lwt.t + + val allocated : context -> contract -> bool tzresult Lwt.t + + val must_be_allocated : context -> contract -> unit tzresult Lwt.t + + val list : context -> contract list Lwt.t + + val get_manager_key : + ?error:error -> context -> public_key_hash -> public_key tzresult Lwt.t + + val is_manager_key_revealed : + context -> public_key_hash -> bool tzresult Lwt.t + + val reveal_manager_key : + context -> public_key_hash -> public_key -> context tzresult Lwt.t + + val get_script_code : + context -> contract -> (context * Script.lazy_expr option) tzresult Lwt.t + + val get_script : + context -> contract -> (context * Script.t option) tzresult Lwt.t + + val get_storage : + context -> contract -> (context * Script.expr option) tzresult Lwt.t + + val get_counter : context -> public_key_hash -> Z.t tzresult Lwt.t + + val get_balance : context -> contract -> Tez.t tzresult Lwt.t + + val get_balance_carbonated : + context -> contract -> (context * Tez.t) tzresult Lwt.t + + val fresh_contract_from_current_nonce : context -> (context * t) tzresult + + val originated_from_current_nonce : + since:context -> until:context -> contract list tzresult Lwt.t + + val get_frozen_bonds : context -> contract -> Tez.t tzresult Lwt.t + + val get_balance_and_frozen_bonds : context -> contract -> Tez.t tzresult Lwt.t + + module Legacy_big_map_diff : sig + type item = private + | Update of { + big_map : Z.t; + diff_key : Script.expr; + diff_key_hash : Script_expr_hash.t; + diff_value : Script.expr option; + } + | Clear of Z.t + | Copy of {src : Z.t; dst : Z.t} + | Alloc of { + big_map : Z.t; + key_type : Script.expr; + value_type : Script.expr; + } + + type t = private item list + + val of_lazy_storage_diff : Lazy_storage.diffs -> t + end + + val update_script_storage : + context -> + contract -> + Script.expr -> + Lazy_storage.diffs option -> + context tzresult Lwt.t + + val used_storage_space : context -> t -> Z.t tzresult Lwt.t + + val increment_counter : context -> public_key_hash -> context tzresult Lwt.t + + val check_counter_increment : + context -> public_key_hash -> Z.t -> unit tzresult Lwt.t + + val raw_originate : + context -> + prepaid_bootstrap_storage:bool -> + t -> + script:Script.t * Lazy_storage.diffs option -> + context tzresult Lwt.t + + module Internal_for_tests : sig + (** see [Contract_repr.originated_contract] for documentation *) + val originated_contract : Origination_nonce.Internal_for_tests.t -> contract + end +end + module Tx_rollup_level : sig include BASIC_DATA @@ -1979,124 +2090,15 @@ module Bond_id : sig val pp : Format.formatter -> t -> unit val compare : t -> t -> int -end - -module Contract : sig - include BASIC_DATA - - type contract = t - - val in_memory_size : t -> Cache_memory_helpers.sint - - val rpc_arg : contract RPC_arg.arg - - val to_b58check : contract -> string - - val of_b58check : string -> contract tzresult - - val implicit_contract : public_key_hash -> contract - - val is_implicit : contract -> public_key_hash option - - val is_originated : contract -> Contract_hash.t option - - val exists : context -> contract -> bool tzresult Lwt.t - - val must_exist : context -> contract -> unit tzresult Lwt.t - - val allocated : context -> contract -> bool tzresult Lwt.t - - val must_be_allocated : context -> contract -> unit tzresult Lwt.t - - val list : context -> contract list Lwt.t - - val get_manager_key : - ?error:error -> context -> public_key_hash -> public_key tzresult Lwt.t - - val is_manager_key_revealed : - context -> public_key_hash -> bool tzresult Lwt.t - - val reveal_manager_key : - context -> public_key_hash -> public_key -> context tzresult Lwt.t - - val get_script_code : - context -> contract -> (context * Script.lazy_expr option) tzresult Lwt.t - - val get_script : - context -> contract -> (context * Script.t option) tzresult Lwt.t - - val get_storage : - context -> contract -> (context * Script.expr option) tzresult Lwt.t - - val get_counter : context -> public_key_hash -> Z.t tzresult Lwt.t - - val get_balance : context -> contract -> Tez.t tzresult Lwt.t - - val get_balance_carbonated : - context -> contract -> (context * Tez.t) tzresult Lwt.t - - val fresh_contract_from_current_nonce : context -> (context * t) tzresult - - val originated_from_current_nonce : - since:context -> until:context -> contract list tzresult Lwt.t - - val get_frozen_bonds : context -> contract -> Tez.t tzresult Lwt.t - - val get_balance_and_frozen_bonds : context -> contract -> Tez.t tzresult Lwt.t - - val fold_on_bond_ids : - context -> - contract -> - order:[`Sorted | `Undefined] -> - init:'a -> - f:(Bond_id.t -> 'a -> 'a Lwt.t) -> - 'a Lwt.t - - module Legacy_big_map_diff : sig - type item = private - | Update of { - big_map : Z.t; - diff_key : Script.expr; - diff_key_hash : Script_expr_hash.t; - diff_value : Script.expr option; - } - | Clear of Z.t - | Copy of {src : Z.t; dst : Z.t} - | Alloc of { - big_map : Z.t; - key_type : Script.expr; - value_type : Script.expr; - } - - type t = private item list - - val of_lazy_storage_diff : Lazy_storage.diffs -> t - end - - val update_script_storage : - context -> - contract -> - Script.expr -> - Lazy_storage.diffs option -> - context tzresult Lwt.t - - val used_storage_space : context -> t -> Z.t tzresult Lwt.t - - val increment_counter : context -> public_key_hash -> context tzresult Lwt.t - - val check_counter_increment : - context -> public_key_hash -> Z.t -> unit tzresult Lwt.t - - val raw_originate : - context -> - prepaid_bootstrap_storage:bool -> - t -> - script:Script.t * Lazy_storage.diffs option -> - context tzresult Lwt.t module Internal_for_tests : sig - (** see [Contract_repr.originated_contract] for documentation *) - val originated_contract : Origination_nonce.Internal_for_tests.t -> contract + val fold_on_bond_ids : + context -> + Contract.t -> + order:[`Sorted | `Undefined] -> + init:'a -> + f:(t -> 'a -> 'a Lwt.t) -> + 'a Lwt.t end end diff --git a/src/proto_alpha/lib_protocol/test/integration/test_frozen_bonds.ml b/src/proto_alpha/lib_protocol/test/integration/test_frozen_bonds.ml index 532e3894a6bb..7878b58fd5e4 100644 --- a/src/proto_alpha/lib_protocol/test/integration/test_frozen_bonds.ml +++ b/src/proto_alpha/lib_protocol/test/integration/test_frozen_bonds.ml @@ -266,7 +266,7 @@ let test_total_stake ~user_is_delegate () = Token.transfer ctxt user_account deposit_account2 deposit_amount >>>=? fun (ctxt, _) -> (* Test folding on bond ids. *) - Contract.fold_on_bond_ids + Bond_id.Internal_for_tests.fold_on_bond_ids ctxt user_contract ~init:[] -- GitLab From 9761a1ea0dda90c0989f6aa870aa70edb55e1241 Mon Sep 17 00:00:00 2001 From: Thomas Letan Date: Thu, 24 Mar 2022 23:51:45 +0100 Subject: [PATCH 05/20] Proto: Introduce `Bitset' --- src/proto_alpha/lib_protocol/TEZOS_PROTOCOL | 1 + src/proto_alpha/lib_protocol/bitset.ml | 51 +++++++++++ src/proto_alpha/lib_protocol/bitset.mli | 45 ++++++++++ src/proto_alpha/lib_protocol/dune.inc | 5 ++ src/proto_alpha/lib_protocol/test/pbt/dune | 1 + .../lib_protocol/test/pbt/test_bitset.ml | 86 +++++++++++++++++++ 6 files changed, 189 insertions(+) create mode 100644 src/proto_alpha/lib_protocol/bitset.ml create mode 100644 src/proto_alpha/lib_protocol/bitset.mli create mode 100644 src/proto_alpha/lib_protocol/test/pbt/test_bitset.ml diff --git a/src/proto_alpha/lib_protocol/TEZOS_PROTOCOL b/src/proto_alpha/lib_protocol/TEZOS_PROTOCOL index d9418b39f9f4..10e8251cd714 100644 --- a/src/proto_alpha/lib_protocol/TEZOS_PROTOCOL +++ b/src/proto_alpha/lib_protocol/TEZOS_PROTOCOL @@ -15,6 +15,7 @@ "Origination_nonce", "Tx_rollup_prefixes", "Merkle_list", + "Bitset", "Slot_repr", "Tez_repr", diff --git a/src/proto_alpha/lib_protocol/bitset.ml b/src/proto_alpha/lib_protocol/bitset.ml new file mode 100644 index 000000000000..ab0bfd4d264a --- /dev/null +++ b/src/proto_alpha/lib_protocol/bitset.ml @@ -0,0 +1,51 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2022 Nomadic Labs *) +(* *) +(* 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 = Z.t + +type error += Invalid_position of int + +let encoding = Data_encoding.z + +let empty = Z.zero + +let mem field pos = + error_when Compare.Int.(pos < 0) (Invalid_position pos) >>? fun () -> + ok @@ Z.testbit field pos + +let add field pos = + error_when Compare.Int.(pos < 0) (Invalid_position pos) >>? fun () -> + ok @@ Z.logor field Z.(shift_left one pos) + +let () = + let open Data_encoding in + register_error_kind + `Permanent + ~id:"bitfield_invalid_position" + ~title:"Invalid bitfield’s position" + ~description:"Bitfields does not accept negative positions" + (obj1 (req "position" int31)) + (function Invalid_position i -> Some i | _ -> None) + (fun i -> Invalid_position i) diff --git a/src/proto_alpha/lib_protocol/bitset.mli b/src/proto_alpha/lib_protocol/bitset.mli new file mode 100644 index 000000000000..0d8038eb6190 --- /dev/null +++ b/src/proto_alpha/lib_protocol/bitset.mli @@ -0,0 +1,45 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2022 Nomadic Labs *) +(* *) +(* 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. *) +(* *) +(*****************************************************************************) + +(** A bitset is a compact structure to store a set of integers. *) +type t + +type error += Invalid_position of int + +val encoding : t Data_encoding.t + +(** A bitset encoding the empty set. *) +val empty : t + +(** [mem field i] returns [true] iff [i] has been added in [field]. + + This functions returns [Invalid_input i] if [i] is negative. *) +val mem : t -> int -> bool tzresult + +(** [add field i] returns a new bitset which contains [i] in + addition to the previous integers of [field]. + + This functions returns [Invalid_input i] if [i] is negative. *) +val add : t -> int -> t tzresult diff --git a/src/proto_alpha/lib_protocol/dune.inc b/src/proto_alpha/lib_protocol/dune.inc index 3c9e63c005ed..3afe6d605a32 100644 --- a/src/proto_alpha/lib_protocol/dune.inc +++ b/src/proto_alpha/lib_protocol/dune.inc @@ -41,6 +41,7 @@ module CamlinternalFormatBasics = struct include CamlinternalFormatBasics end origination_nonce.mli origination_nonce.ml tx_rollup_prefixes.mli tx_rollup_prefixes.ml merkle_list.mli merkle_list.ml + bitset.mli bitset.ml slot_repr.mli slot_repr.ml tez_repr.mli tez_repr.ml period_repr.mli period_repr.ml @@ -221,6 +222,7 @@ module CamlinternalFormatBasics = struct include CamlinternalFormatBasics end origination_nonce.mli origination_nonce.ml tx_rollup_prefixes.mli tx_rollup_prefixes.ml merkle_list.mli merkle_list.ml + bitset.mli bitset.ml slot_repr.mli slot_repr.ml tez_repr.mli tez_repr.ml period_repr.mli period_repr.ml @@ -401,6 +403,7 @@ module CamlinternalFormatBasics = struct include CamlinternalFormatBasics end origination_nonce.mli origination_nonce.ml tx_rollup_prefixes.mli tx_rollup_prefixes.ml merkle_list.mli merkle_list.ml + bitset.mli bitset.ml slot_repr.mli slot_repr.ml tez_repr.mli tez_repr.ml period_repr.mli period_repr.ml @@ -603,6 +606,7 @@ include Tezos_raw_protocol_alpha.Main Origination_nonce Tx_rollup_prefixes Merkle_list + Bitset Slot_repr Tez_repr Period_repr @@ -824,6 +828,7 @@ include Tezos_raw_protocol_alpha.Main origination_nonce.mli origination_nonce.ml tx_rollup_prefixes.mli tx_rollup_prefixes.ml merkle_list.mli merkle_list.ml + bitset.mli bitset.ml slot_repr.mli slot_repr.ml tez_repr.mli tez_repr.ml period_repr.mli period_repr.ml diff --git a/src/proto_alpha/lib_protocol/test/pbt/dune b/src/proto_alpha/lib_protocol/test/pbt/dune index 65bbc730a201..63ea4b5efc44 100644 --- a/src/proto_alpha/lib_protocol/test/pbt/dune +++ b/src/proto_alpha/lib_protocol/test/pbt/dune @@ -9,6 +9,7 @@ test_tez_repr test_tx_rollup_l2_encoding test_tx_rollup_l2_withdraw_storage + test_bitset test_sc_rollup_tick_repr refutation_game_pbt test_carbonated_map) diff --git a/src/proto_alpha/lib_protocol/test/pbt/test_bitset.ml b/src/proto_alpha/lib_protocol/test/pbt/test_bitset.ml new file mode 100644 index 000000000000..e61b7b2c98cc --- /dev/null +++ b/src/proto_alpha/lib_protocol/test/pbt/test_bitset.ml @@ -0,0 +1,86 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2022 Nomadic Labs, *) +(* *) +(* 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. *) +(* *) +(*****************************************************************************) + +(** Testing + ------- + Component: Protocol Library + Invocation: dune exec src/proto_alpha/lib_protocol/test/pbt/test_bitset.exe + Subject: Bitset structure +*) + +open Lib_test.Qcheck2_helpers +open Protocol.Bitset + +let gen_ofs = QCheck2.Gen.int_bound (64 * 10) + +let gen_storage = + let open QCheck2.Gen in + let* bool_vector = list bool in + match + List.fold_left_i_e + (fun i storage v -> if v then add storage i else ok storage) + empty + bool_vector + with + | Ok v -> return v + | Error e -> + Alcotest.failf + "An unxpected error %a occurred when generating Bitset.t" + Protocol.Environment.Error_monad.pp_trace + e + +let test_get_set (c, ofs) = + List.for_all + (fun ofs' -> + let res = + let open Tzresult_syntax in + let* c' = add c ofs in + let* v = mem c ofs' in + let* v' = mem c' ofs' in + return (if ofs = ofs' then v' = true else v = v') + in + match res with + | Error e -> + Alcotest.failf + "Unexpected error: %a" + Protocol.Environment.Error_monad.pp_trace + e + | Ok res -> res) + (0 -- 63) + +let () = + Alcotest.run + "bits" + [ + ( "quantity", + qcheck_wrap + [ + QCheck2.Test.make + ~count:10000 + ~name:"get set" + QCheck2.Gen.(pair gen_storage gen_ofs) + test_get_set; + ] ); + ] -- GitLab From 7b451fb6096b2a4a6ce24ffd9f6a2db7bee2f179 Mon Sep 17 00:00:00 2001 From: Sylvain Ribstein Date: Wed, 23 Mar 2022 10:54:56 +0100 Subject: [PATCH 06/20] Proto,tx_rollup: Turn withdraw operation into generic Transfer_ticket Before this patch, withdrawing an asset from a transaction rollup worked as follows. 1. A `Withdraw' operation in the layer-2 has to be batched and submitted to the layer-1 2. A commitment for this batch has to be posted to the layer-1 3. Once this commitment is finalized, a `Tx_rollup_withdraw' operation can be submitted This logic does not play well with commitment merklisation, because it implies providing the same proof several time (the proof about the message_result_hash being part of the commitment). As a consequence, we refine this logic by adding a new operation, `Tx_rollup_dispatch_tickets', which is used to handle all the withdrawals of a given batch at once. Then, we introduce `Transfer_tickets', which allows implicit accounts to give tickets back to smart contracts. Co-authored-by: Thomas Letan --- .../lib_client/client_proto_context.ml | 6 +- src/proto_alpha/lib_client/injection.ml | 10 +- .../lib_client/operation_result.ml | 55 +- src/proto_alpha/lib_protocol/TEZOS_PROTOCOL | 7 +- src/proto_alpha/lib_protocol/alpha_context.ml | 13 +- .../lib_protocol/alpha_context.mli | 156 +- src/proto_alpha/lib_protocol/apply.ml | 268 ++- src/proto_alpha/lib_protocol/apply_results.ml | 141 +- .../lib_protocol/apply_results.mli | 10 +- src/proto_alpha/lib_protocol/dune.inc | 35 +- .../lib_protocol/operation_repr.ml | 177 +- .../lib_protocol/operation_repr.mli | 53 +- src/proto_alpha/lib_protocol/storage.ml | 32 +- src/proto_alpha/lib_protocol/storage.mli | 17 +- .../lib_protocol/test/helpers/block.ml | 6 +- .../lib_protocol/test/helpers/op.ml | 42 +- .../lib_protocol/test/helpers/op.mli | 63 +- .../integration/operations/test_tx_rollup.ml | 1570 ++++++----------- src/proto_alpha/lib_protocol/test/pbt/dune | 1 - .../lib_protocol/ticket_storage.mli | 4 +- .../lib_protocol/tx_rollup_commitment_repr.ml | 76 +- .../tx_rollup_commitment_repr.mli | 50 +- .../tx_rollup_commitment_storage.ml | 20 +- .../tx_rollup_commitment_storage.mli | 5 +- .../lib_protocol/tx_rollup_errors_repr.ml | 86 +- .../lib_protocol/tx_rollup_inbox_storage.ml | 2 +- .../lib_protocol/tx_rollup_l2_apply.ml | 15 +- .../lib_protocol/tx_rollup_l2_apply.mli | 9 +- .../lib_protocol/tx_rollup_l2_verifier.ml | 10 +- .../lib_protocol/tx_rollup_l2_verifier.mli | 2 +- .../lib_protocol/tx_rollup_message_repr.ml | 21 + ... => tx_rollup_message_result_hash_repr.ml} | 82 +- .../tx_rollup_message_result_hash_repr.mli | 39 + .../tx_rollup_message_result_repr.ml | 52 + .../tx_rollup_message_result_repr.mli | 47 + .../lib_protocol/tx_rollup_reveal_repr.ml | 46 + .../lib_protocol/tx_rollup_reveal_repr.mli | 36 + .../lib_protocol/tx_rollup_reveal_storage.ml | 59 + ...orage.mli => tx_rollup_reveal_storage.mli} | 42 +- .../lib_protocol/tx_rollup_state_repr.ml | 8 +- .../lib_protocol/tx_rollup_state_repr.mli | 6 +- .../lib_protocol/tx_rollup_ticket.ml | 118 ++ .../lib_protocol/tx_rollup_ticket.mli | 104 ++ .../tx_rollup_withdraw_list_hash_repr.ml | 54 + .../tx_rollup_withdraw_list_hash_repr.mli | 30 + .../lib_protocol/tx_rollup_withdraw_repr.ml | 164 +- .../lib_protocol/tx_rollup_withdraw_repr.mli | 74 +- .../tx_rollup_withdraw_storage.ml | 109 -- 48 files changed, 1929 insertions(+), 2103 deletions(-) rename src/proto_alpha/lib_protocol/{test/pbt/test_tx_rollup_l2_withdraw_storage.ml => tx_rollup_message_result_hash_repr.ml} (54%) create mode 100644 src/proto_alpha/lib_protocol/tx_rollup_message_result_hash_repr.mli create mode 100644 src/proto_alpha/lib_protocol/tx_rollup_message_result_repr.ml create mode 100644 src/proto_alpha/lib_protocol/tx_rollup_message_result_repr.mli create mode 100644 src/proto_alpha/lib_protocol/tx_rollup_reveal_repr.ml create mode 100644 src/proto_alpha/lib_protocol/tx_rollup_reveal_repr.mli create mode 100644 src/proto_alpha/lib_protocol/tx_rollup_reveal_storage.ml rename src/proto_alpha/lib_protocol/{tx_rollup_withdraw_storage.mli => tx_rollup_reveal_storage.mli} (68%) create mode 100644 src/proto_alpha/lib_protocol/tx_rollup_ticket.ml create mode 100644 src/proto_alpha/lib_protocol/tx_rollup_ticket.mli create mode 100644 src/proto_alpha/lib_protocol/tx_rollup_withdraw_list_hash_repr.ml create mode 100644 src/proto_alpha/lib_protocol/tx_rollup_withdraw_list_hash_repr.mli delete mode 100644 src/proto_alpha/lib_protocol/tx_rollup_withdraw_storage.ml diff --git a/src/proto_alpha/lib_client/client_proto_context.ml b/src/proto_alpha/lib_client/client_proto_context.ml index 872de0fdfc7c..1522b351d82b 100644 --- a/src/proto_alpha/lib_client/client_proto_context.ml +++ b/src/proto_alpha/lib_client/client_proto_context.ml @@ -1004,14 +1004,14 @@ let submit_tx_rollup_rejection (cctxt : #full) ~chain ~block ?confirmations failwith "%s is not a valid notation for a context hash" context_hash) >>=? fun context_hash -> (match - Tx_rollup_withdraw.Merkle.root_of_b58check_opt withdrawals_merkle_root + Tx_rollup_withdraw_list_hash.of_b58check_opt withdrawals_merkle_root with | Some hash -> return hash | None -> failwith "%s is not a valid notation for a withdraw list hash" withdrawals_merkle_root) - >>=? fun withdrawals_merkle_root -> + >>=? fun withdraw_list_hash -> (match Data_encoding.Json.from_string message_path with | Ok json -> Data_encoding.Json.destruct Tx_rollup_inbox.Merkle.path_encoding json @@ -1038,7 +1038,7 @@ let submit_tx_rollup_rejection (cctxt : #full) ~chain ~block ?confirmations message; message_position; message_path; - previous_message_result = {context_hash; withdrawals_merkle_root}; + previous_message_result = {context_hash; withdraw_list_hash}; proof; })) in diff --git a/src/proto_alpha/lib_client/injection.ml b/src/proto_alpha/lib_client/injection.ml index dd41e646ecb0..a46ab2c0ad58 100644 --- a/src/proto_alpha/lib_client/injection.ml +++ b/src/proto_alpha/lib_client/injection.ml @@ -337,7 +337,9 @@ let estimated_gas_single (type kind) | Applied (Tx_rollup_remove_commitment_result {consumed_gas; _}) -> Ok consumed_gas | Applied (Tx_rollup_rejection_result {consumed_gas; _}) -> Ok consumed_gas - | Applied (Tx_rollup_withdraw_result {consumed_gas; _}) -> Ok consumed_gas + | Applied (Tx_rollup_dispatch_tickets_result {consumed_gas; _}) -> + Ok consumed_gas + | Applied (Transfer_ticket_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 @@ -393,7 +395,8 @@ let estimated_storage_single (type kind) ~tx_rollup_origination_size | 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 (Tx_rollup_withdraw_result _) -> Ok Z.zero + | Applied (Tx_rollup_dispatch_tickets_result _) -> Ok Z.zero + | Applied (Transfer_ticket_result _) -> Ok Z.zero | Applied (Sc_rollup_originate_result {size; _}) -> Ok size | Applied (Sc_rollup_add_messages_result _) -> Ok Z.zero (* The following Sc_rollup operations have zero storage cost because we @@ -460,7 +463,8 @@ let originated_contracts_single (type kind) | Applied (Tx_rollup_finalize_commitment_result _) -> Ok [] | Applied (Tx_rollup_remove_commitment_result _) -> Ok [] | Applied (Tx_rollup_rejection_result _) -> Ok [] - | Applied (Tx_rollup_withdraw_result _) -> Ok [] + | Applied (Tx_rollup_dispatch_tickets_result _) -> Ok [] + | Applied (Transfer_ticket_result _) -> Ok [] | Applied (Sc_rollup_originate_result _) -> Ok [] | Applied (Sc_rollup_add_messages_result _) -> Ok [] | Applied (Sc_rollup_cement_result _) -> Ok [] diff --git a/src/proto_alpha/lib_client/operation_result.ml b/src/proto_alpha/lib_client/operation_result.ml index a794525b44f8..5c8251a2c3f7 100644 --- a/src/proto_alpha/lib_client/operation_result.ml +++ b/src/proto_alpha/lib_client/operation_result.ml @@ -249,18 +249,27 @@ let pp_manager_operation_content (type kind) source internal pp_result ppf source pp_result result - | Tx_rollup_withdraw {tx_rollup; _} -> + | Tx_rollup_dispatch_tickets {tx_rollup; _} -> Format.fprintf ppf "@[%s:%a@,From: %a%a@]" - (if internal then "Internal tx rollup withdraw" - else "Tx rollup withdraw") + (if internal then "Internal tx rollup dispatch tickets" + else "Tx rollup dispatch tickets") Tx_rollup.pp tx_rollup Contract.pp source pp_result result + | Transfer_ticket _ -> + Format.fprintf + ppf + "@[%s:@,From: %a%a@]" + (if internal then "Internal transfer ticket" else "Transfer ticket") + Contract.pp + source + pp_result + result | Sc_rollup_originate {kind; boot_sector} -> let (module R : Sc_rollups.PVM.S) = Sc_rollups.of_kind kind in Format.fprintf @@ -619,8 +628,19 @@ 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_withdraw_result - (Tx_rollup_withdraw_result + let pp_tx_rollup_dispatch_tickets_result + (Tx_rollup_dispatch_tickets_result + {balance_updates; consumed_gas; paid_storage_size_diff}) = + if paid_storage_size_diff <> Z.zero then + Format.fprintf + ppf + "@,Paid storage size diff: %s bytes" + (Z.to_string paid_storage_size_diff) ; + Format.fprintf ppf "@,Consumed gas: %a" Gas.Arith.pp consumed_gas ; + pp_balance_updates_opt ppf balance_updates + in + let pp_transfer_ticket_result + (Transfer_ticket_result {balance_updates; consumed_gas; paid_storage_size_diff}) = if paid_storage_size_diff <> Z.zero then Format.fprintf @@ -795,17 +815,28 @@ let pp_manager_operation_contents_and_result ppf "@[This tx rollup rejection operation was BACKTRACKED, its \ expected effects (as follow) were NOT applied.@]" ; pp_tx_rollup_rejection_result op - | Applied (Tx_rollup_withdraw_result _ as op) -> + | Applied (Tx_rollup_dispatch_tickets_result _ as op) -> Format.fprintf ppf - "This tx rollup withdraw operation was successfully applied" ; - pp_tx_rollup_withdraw_result op - | Backtracked ((Tx_rollup_withdraw_result _ as op), _err) -> + "This tx rollup reveal_withdrawals operation was successfully applied" ; + pp_tx_rollup_dispatch_tickets_result op + | Backtracked ((Tx_rollup_dispatch_tickets_result _ as op), _err) -> Format.fprintf ppf - "@[This tx rollup withdraw rollup operation was BACKTRACKED, \ - its expected effects (as follow) were NOT applied.@]" ; - pp_tx_rollup_withdraw_result op + "@[This tx rollup reveal_withdrawals rollup operation was \ + BACKTRACKED, its expected effects (as follow) were NOT applied.@]" ; + pp_tx_rollup_dispatch_tickets_result op + | Applied (Transfer_ticket_result _ as op) -> + Format.fprintf + ppf + "This transfer ticket operation was successfully applied" ; + pp_transfer_ticket_result op + | Backtracked ((Transfer_ticket_result _ as op), _err) -> + Format.fprintf + ppf + "@[This transfer ticket operation was BACKTRACKED, its expected \ + effects (as follow) were NOT applied.@]" ; + pp_transfer_ticket_result op | Applied (Sc_rollup_originate_result _ as op) -> Format.fprintf ppf diff --git a/src/proto_alpha/lib_protocol/TEZOS_PROTOCOL b/src/proto_alpha/lib_protocol/TEZOS_PROTOCOL index 10e8251cd714..5dcfc5c4ca8b 100644 --- a/src/proto_alpha/lib_protocol/TEZOS_PROTOCOL +++ b/src/proto_alpha/lib_protocol/TEZOS_PROTOCOL @@ -55,8 +55,12 @@ "Tx_rollup_l2_context_hash", "Tx_rollup_repr", "Tx_rollup_withdraw_repr", + "Tx_rollup_withdraw_list_hash_repr", + "Tx_rollup_reveal_repr", "Tx_rollup_message_repr", "Tx_rollup_inbox_repr", + "Tx_rollup_message_result_repr", + "Tx_rollup_message_result_hash_repr", "Tx_rollup_commitment_repr", "Tx_rollup_errors_repr", "Tx_rollup_state_repr", @@ -120,7 +124,7 @@ "Global_constants_costs", "Global_constants_storage", "Tx_rollup_state_storage", - "Tx_rollup_withdraw_storage", + "Tx_rollup_reveal_storage", "Tx_rollup_inbox_storage", "Tx_rollup_commitment_storage", "Tx_rollup_storage", @@ -169,6 +173,7 @@ "Ticket_token_map", "Ticket_operations_diff", "Ticket_accounting", + "Tx_rollup_ticket", "Script_interpreter_defs", "Script_interpreter", diff --git a/src/proto_alpha/lib_protocol/alpha_context.ml b/src/proto_alpha/lib_protocol/alpha_context.ml index 7e0628001977..ba04a81950c0 100644 --- a/src/proto_alpha/lib_protocol/alpha_context.ml +++ b/src/proto_alpha/lib_protocol/alpha_context.ml @@ -239,8 +239,7 @@ end module Tx_rollup_level = Tx_rollup_level_repr module Tx_rollup_commitment_hash = Tx_rollup_commitment_repr.Commitment_hash -module Tx_rollup_message_result_hash = - Tx_rollup_commitment_repr.Message_result_hash +module Tx_rollup_message_result_hash = Tx_rollup_message_result_hash_repr module Tx_rollup = struct include Tx_rollup_repr @@ -258,9 +257,13 @@ module Tx_rollup_state = struct end end -module Tx_rollup_withdraw = struct - include Tx_rollup_withdraw_repr - include Tx_rollup_withdraw_storage +module Tx_rollup_withdraw = Tx_rollup_withdraw_repr +module Tx_rollup_withdraw_list_hash = Tx_rollup_withdraw_list_hash_repr +module Tx_rollup_message_result = Tx_rollup_message_result_repr + +module Tx_rollup_reveal = struct + include Tx_rollup_reveal_repr + include Tx_rollup_reveal_storage end module Tx_rollup_message = struct diff --git a/src/proto_alpha/lib_protocol/alpha_context.mli b/src/proto_alpha/lib_protocol/alpha_context.mli index f718ee752753..1b217f057bcc 100644 --- a/src/proto_alpha/lib_protocol/alpha_context.mli +++ b/src/proto_alpha/lib_protocol/alpha_context.mli @@ -1658,14 +1658,53 @@ module Tx_rollup : sig end end +module Tx_rollup_withdraw : sig + type order = { + claimer : Signature.Public_key_hash.t; + ticket_hash : Ticket_hash.t; + amount : Tx_rollup_l2_qty.t; + } + + type t = order + + val encoding : t Data_encoding.t +end + +module Tx_rollup_withdraw_list_hash : sig + include S.HASH + + val hash : Tx_rollup_withdraw.t list -> t + + val empty : t +end + +module Tx_rollup_message_result : sig + type t = { + context_hash : Context_hash.t; + withdraw_list_hash : Tx_rollup_withdraw_list_hash.t; + } + + val encoding : t Data_encoding.t + + val empty_l2_context_hash : Context_hash.t + + val init : t +end + +module Tx_rollup_message_result_hash : sig + include S.HASH + + val hash : Tx_rollup_message_result.t -> t + + val init : t +end + module Tx_rollup_commitment_hash : sig val commitment_hash : string include S.HASH end -module Tx_rollup_message_result_hash : S.HASH - (** This module re-exports definitions from {!Tx_rollup_state_repr} and {!Tx_rollup_state_storage}. *) module Tx_rollup_state : sig @@ -1733,57 +1772,38 @@ module Tx_rollup_state : sig end end -module Tx_rollup_withdraw : sig - type withdrawal = { - claimer : Signature.Public_key_hash.t; - ticket_hash : Ticket_hash.t; +module Tx_rollup_reveal : sig + type t = { + contents : Script.lazy_expr; + ty : Script.lazy_expr; + ticketer : Contract.t; amount : Tx_rollup_l2_qty.t; + claimer : Signature.Public_key_hash.t; } - type t = withdrawal - val encoding : t Data_encoding.t - module Merkle : sig - type root - - type path - - val empty : root - - val path_encoding : path Data_encoding.t - - val root_encoding : root Data_encoding.t - - val root_of_b58check_opt : string -> root option - - val compute_path : withdrawal list -> int -> path tzresult - - val check_path : path -> int -> withdrawal -> root -> bool tzresult - - val merklize_list : withdrawal list -> root - - val path_depth : path -> int - end - - val add : + val record : context -> - Tx_rollup_state.t -> Tx_rollup.t -> + Tx_rollup_state.t -> Tx_rollup_level.t -> - message_index:int -> - withdraw_position:int -> + message_position:int -> (context * Tx_rollup_state.t * Z.t) tzresult Lwt.t val mem : context -> Tx_rollup.t -> Tx_rollup_level.t -> - message_index:int -> - withdraw_position:int -> - (bool * context) tzresult Lwt.t + message_position:int -> + (context * bool) tzresult Lwt.t - val maximum_path_depth : withdraw_count_limit:int -> int + val remove : + context -> + Tx_rollup.t -> + Tx_rollup_state.t -> + Tx_rollup_level.t -> + (context * Tx_rollup_state_repr.t) tzresult Lwt.t end (** This module re-exports definitions from {!Tx_rollup_message_repr}. *) @@ -1893,18 +1913,6 @@ end (** This simply re-exports [Tx_rollup_commitment_repr] *) module Tx_rollup_commitment : sig - type message_result = { - context_hash : Context_hash.t; - withdrawals_merkle_root : Tx_rollup_withdraw.Merkle.root; - } - - val hash_message_result : message_result -> Tx_rollup_message_result_hash.t - - val pp_message_result_hash : - Format.formatter -> Tx_rollup_message_result_hash.t -> unit - - val empty_l2_context_hash : Context_hash.t - type t = { level : Tx_rollup_level.t; messages : Tx_rollup_message_result_hash.t list; @@ -1932,7 +1940,8 @@ module Tx_rollup_commitment : sig val hash : t -> Tx_rollup_commitment_hash.t - val check_message_result : t -> message_result -> message_index:int -> bool + val check_message_result : + t -> Tx_rollup_message_result.t -> message_index:int -> bool val add_commitment : context -> @@ -1974,6 +1983,7 @@ module Tx_rollup_commitment : sig val get_finalized : context -> Tx_rollup.t -> + Tx_rollup_state.t -> Tx_rollup_level.t -> (context * Submitted_commitment.t) tzresult Lwt.t @@ -2032,6 +2042,7 @@ module Tx_rollup_errors : sig | Message_size_exceeds_limit | Too_many_inboxes | Too_many_commitments + | Too_many_withdrawals | Wrong_batch_count | Commitment_too_early of { provided : Tx_rollup_level.t; @@ -2049,7 +2060,6 @@ module Tx_rollup_errors : sig provided : Tx_rollup_commitment_hash.t option; expected : Tx_rollup_commitment_hash.t option; } - | Invalid_rejection_level_argument | Internal_error of string | Wrong_message_position of { level : Tx_rollup_level.t; @@ -2065,16 +2075,17 @@ module Tx_rollup_errors : sig } | Withdraw_invalid_path | Withdraw_already_consumed + | Withdrawals_invalid_path + | Withdrawals_already_dispatched | Cannot_reject_level of { provided : Tx_rollup_level.t; accepted_range : (Tx_rollup_level.t * Tx_rollup_level.t) option; } | Wrong_rejection_hashes of { - provided : Tx_rollup_commitment.message_result; + provided : Tx_rollup_message_result.t; computed : Tx_rollup_message_result_hash.t; expected : Tx_rollup_message_result_hash.t; } - | Deposit_wrong_ticketer of Tx_rollup.t | Wrong_deposit_parameters | Proof_failed_to_reject | Proof_produced_rejected_state @@ -2082,6 +2093,7 @@ module Tx_rollup_errors : sig agreed : Context_hash.t; provided : Context_hash.t; } + | No_withdrawals_to_dispatch end module Bond_id : sig @@ -2762,7 +2774,9 @@ module Kind : sig type tx_rollup_rejection = Tx_rollup_rejection_kind - type tx_rollup_withdraw = Tx_rollup_withdraw_kind + type tx_rollup_dispatch_tickets = Tx_rollup_dispatch_tickets_kind + + type transfer_ticket = Transfer_ticket_kind type sc_rollup_originate = Sc_rollup_originate_kind @@ -2788,7 +2802,9 @@ module Kind : sig | Tx_rollup_remove_commitment_manager_kind : tx_rollup_remove_commitment manager | Tx_rollup_rejection_manager_kind : tx_rollup_rejection manager - | Tx_rollup_withdraw_manager_kind : tx_rollup_withdraw manager + | Tx_rollup_dispatch_tickets_manager_kind + : tx_rollup_dispatch_tickets manager + | Transfer_ticket_manager_kind : transfer_ticket manager | Sc_rollup_originate_manager_kind : sc_rollup_originate manager | Sc_rollup_add_messages_manager_kind : sc_rollup_add_messages manager | Sc_rollup_cement_manager_kind : sc_rollup_cement manager @@ -2941,26 +2957,27 @@ and _ manager_operation = message : Tx_rollup_message.t; message_position : int; message_path : Tx_rollup_inbox.Merkle.path; - previous_message_result : Tx_rollup_commitment.message_result; + previous_message_result : Tx_rollup_message_result.t; proof : Tx_rollup_l2_proof.t; } -> Kind.tx_rollup_rejection manager_operation - | Tx_rollup_withdraw : { + | Tx_rollup_dispatch_tickets : { tx_rollup : Tx_rollup.t; level : Tx_rollup_level.t; context_hash : Context_hash.t; message_index : int; - withdrawals_merkle_root : Tx_rollup_withdraw.Merkle.root; - withdraw_path : Tx_rollup_withdraw.Merkle.path; - withdraw_position : int; + tickets_info : Tx_rollup_reveal.t list; + } + -> Kind.tx_rollup_dispatch_tickets manager_operation + | Transfer_ticket : { contents : Script.lazy_expr; ty : Script.lazy_expr; ticketer : Contract.t; - amount : Tx_rollup_l2_qty.t; + amount : Z.t; destination : Contract.t; entrypoint : Entrypoint.t; } - -> Kind.tx_rollup_withdraw manager_operation + -> Kind.transfer_ticket manager_operation | Sc_rollup_originate : { kind : Sc_rollup.Kind.t; boot_sector : string; @@ -3123,7 +3140,10 @@ module Operation : sig val tx_rollup_rejection_case : Kind.tx_rollup_rejection Kind.manager case - val tx_rollup_withdraw_case : Kind.tx_rollup_withdraw Kind.manager case + val tx_rollup_dispatch_tickets_case : + Kind.tx_rollup_dispatch_tickets Kind.manager case + + val transfer_ticket_case : Kind.transfer_ticket Kind.manager case val register_global_constant_case : Kind.register_global_constant Kind.manager case @@ -3185,7 +3205,9 @@ module Operation : sig val tx_rollup_rejection_case : Kind.tx_rollup_rejection case - val tx_rollup_withdraw_case : Kind.tx_rollup_withdraw case + val tx_rollup_dispatch_tickets_case : Kind.tx_rollup_dispatch_tickets case + + val transfer_ticket_case : Kind.transfer_ticket case val sc_rollup_originate_case : Kind.sc_rollup_originate case @@ -3351,7 +3373,9 @@ end documentation of the functions there. *) module Ticket_balance : sig - type error += Used_storage_space_underflow + type error += + | Negative_ticket_balance of {key : Ticket_hash.t; balance : Z.t} + | Used_storage_space_underflow val adjust_balance : context -> Ticket_hash.t -> delta:Z.t -> (Z.t * context) tzresult Lwt.t diff --git a/src/proto_alpha/lib_protocol/apply.ml b/src/proto_alpha/lib_protocol/apply.ml index 2c7573e5bc21..d4da48b36fa0 100644 --- a/src/proto_alpha/lib_protocol/apply.ml +++ b/src/proto_alpha/lib_protocol/apply.ml @@ -97,6 +97,7 @@ type error += | Tx_rollup_feature_disabled | Tx_rollup_invalid_transaction_amount | Tx_rollup_non_internal_transaction + | Cannot_transfer_ticket_to_implicit | Sc_rollup_feature_disabled | Inconsistent_counters | Wrong_voting_period of {expected : int32; provided : int32} @@ -514,6 +515,15 @@ let () = (function Tx_rollup_invalid_transaction_amount -> Some () | _ -> None) (fun () -> Tx_rollup_invalid_transaction_amount) ; + register_error_kind + `Permanent + ~id:"operation.cannot_transfer_ticket_to_implicit" + ~title:"Cannot transfer ticket to implicit account" + ~description:"Cannot transfer ticket to implicit account" + Data_encoding.unit + (function Cannot_transfer_ticket_to_implicit -> Some () | _ -> None) + (fun () -> Cannot_transfer_ticket_to_implicit) ; + register_error_kind `Permanent ~id:"operation.tx_rollup_non_internal_transaction" @@ -1271,151 +1281,115 @@ let apply_external_manager_operation_content : ~internal:false | Transaction {destination = Tx_rollup _; _} -> fail Tx_rollup_non_internal_transaction - | Tx_rollup_withdraw - { - tx_rollup; - level; - context_hash; - message_index; - withdrawals_merkle_root; - withdraw_path; - withdraw_position; - contents; - ty; - ticketer; - amount; - destination; - entrypoint; - } -> - (* Ticket parsing and hashing *) - Script.force_decode_in_context ~consume_deserialization_gas ctxt ty - >>?= fun (ty, ctxt) -> - Script.force_decode_in_context ~consume_deserialization_gas ctxt contents - >>?= fun (contents, ctxt) -> - Script_ir_translator.parse_comparable_ty ctxt (Micheline.root ty) - >>?= fun (Ex_comparable_ty contents_type, ctxt) -> - Script_ir_translator.parse_comparable_data - ctxt - contents_type - (Micheline.root contents) - >>=? fun (contents, ctxt) -> - let ticket_token = - Ticket_token.Ex_token {ticketer; contents_type; contents} - in - Ticket_balance_key.of_ex_token - ctxt - ~owner:(Tx_rollup tx_rollup) - ticket_token - (* Computing the withdrawal hash *) - >>=? fun (tx_rollup_ticket_hash, ctxt) -> - let withdrawal = - Tx_rollup_withdraw. - {claimer = source; ticket_hash = tx_rollup_ticket_hash; amount} - in - Tx_rollup_withdraw.Merkle.check_path - withdraw_path - withdraw_position - withdrawal - withdrawals_merkle_root - >>?= fun is_path_correct -> - fail_unless is_path_correct Tx_rollup_errors.Withdraw_invalid_path - >>=? fun () -> - Tx_rollup_commitment.get_finalized ctxt tx_rollup level + | Tx_rollup_dispatch_tickets + {tx_rollup; level; context_hash; message_index; tickets_info} -> + Tx_rollup_state.get ctxt tx_rollup >>=? fun (ctxt, state) -> + Tx_rollup_commitment.get_finalized ctxt tx_rollup state level >>=? fun (ctxt, commitment) -> - fail_unless + Tx_rollup_reveal.mem ctxt tx_rollup level ~message_position:message_index + >>=? fun (ctxt, already_revealed) -> + error_when + already_revealed + Tx_rollup_errors.Withdrawals_already_dispatched + >>?= fun () -> + (* The size of the list [tickets_info] is bounded by a + parametric constant, and checked in precheck. *) + List.fold_left_es + (fun (acc_withdraw, acc, ctxt) + Tx_rollup_reveal.{contents; ty; ticketer; amount; claimer} -> + Tx_rollup_ticket.parse_ticket + ~consume_deserialization_gas + ~ticketer + ~contents + ~ty + ctxt + >>=? fun (ctxt, ticket_token) -> + Tx_rollup_ticket.make_withdraw_order + ctxt + tx_rollup + ticket_token + claimer + amount + >>=? fun (ctxt, withdrawal) -> + return + (withdrawal :: acc_withdraw, (withdrawal, ticket_token) :: acc, ctxt)) + ([], [], ctxt) + tickets_info + >>=? fun (rev_withdraw_list, rev_ex_token_and_hash_list, ctxt) -> + let withdraw_list_hash = + Tx_rollup_withdraw_list_hash.hash @@ List.rev rev_withdraw_list + in + error_unless (Tx_rollup_commitment.check_message_result commitment.commitment - {context_hash; withdrawals_merkle_root} + {context_hash; withdraw_list_hash} ~message_index) - Tx_rollup_errors.Withdraw_invalid_path - >>=? fun () -> - Tx_rollup_withdraw.mem + Tx_rollup_errors.Withdrawals_invalid_path + >>?= fun () -> + Tx_rollup_reveal.record ctxt tx_rollup - level - ~message_index - ~withdraw_position - >>=? fun (already_consumed, ctxt) -> - fail_when already_consumed Tx_rollup_errors.Withdraw_already_consumed - >>=? fun () -> - Tx_rollup_state.get ctxt tx_rollup >>=? fun (ctxt, state) -> - Tx_rollup_withdraw.add - ctxt state - tx_rollup level - ~message_index - ~withdraw_position - >>=? fun (ctxt, state, withdraw_paid_storage_size_diff) -> - Tx_rollup_state.update ctxt tx_rollup state >>=? fun ctxt -> - (* Now reconstruct the ticket sent as the parameter - destination. *) - Option.value_e - ~error: - (Error_monad.trace_of_error - @@ Tx_rollup_errors.Internal_error - "withdraw amount is negative, this can't happens because it \ - comes from a qty.") - Script_int.(is_nat @@ of_int64 @@ Tx_rollup_l2_qty.to_int64 amount) - >>?= fun amount_node -> - Script_typed_ir.ticket_t Micheline.dummy_location contents_type - >>?= fun ticket_ty -> - let ticket = Script_typed_ir.{ticketer; contents; amount = amount_node} in - Script_ir_translator.unparse_data ctxt Optimized ticket_ty ticket - >>=? fun (parameters_expr, ctxt) -> - let parameters = - Script.lazy_expr (Micheline.strip_locations parameters_expr) + ~message_position:message_index + >>=? fun (ctxt, state, reveal_diff) -> + let adjust_ticket_balance (ctxt, state, acc_diff) + ( Tx_rollup_withdraw. + {claimer; amount; ticket_hash = tx_rollup_ticket_hash}, + ticket_token ) = + let amount = Tx_rollup_l2_qty.to_z amount in + Ticket_balance_key.of_ex_token + ctxt + ~owner:(Contract (Contract.implicit_contract claimer)) + ticket_token + >>=? fun (claimer_ticket_hash, ctxt) -> + Tx_rollup_ticket.transfer_ticket_with_hashes + ctxt + ~src_hash:tx_rollup_ticket_hash + ~dst_hash:claimer_ticket_hash + amount + >>=? fun (ctxt, diff) -> return (ctxt, state, Z.(add acc_diff diff)) in - let op = - Script_typed_ir.Internal_operation + List.fold_left_es + adjust_ticket_balance + (ctxt, state, reveal_diff) + rev_ex_token_and_hash_list + >>=? fun (ctxt, state, paid_storage_size_diff) -> + Tx_rollup_state.update ctxt tx_rollup state >>=? fun ctxt -> + let result = + Tx_rollup_dispatch_tickets_result { - source = source_contract; - nonce = 0; - operation = - Transaction - { - transaction = - { - amount = Tez.zero; - parameters; - destination = Contract destination; - entrypoint; - }; - location = Micheline.location parameters_expr; - parameters_ty = ticket_ty; - parameters = ticket; - }; + balance_updates = []; + consumed_gas = Gas.consumed ~since:before_operation ~until:ctxt; + paid_storage_size_diff; } in - (* remove tickets from the tx_rollup and add them to the destination - contract *) - Ticket_balance_key.of_ex_token - ctxt - ~owner:(Contract destination) - ticket_token - >>=? fun (destination_ticket_hash, ctxt) -> - Ticket_balance.adjust_balance + return (ctxt, result, []) + | Transfer_ticket {contents; ty; ticketer; amount; destination; entrypoint} -> + error_when + (Option.is_some @@ Contract.is_implicit destination) + Cannot_transfer_ticket_to_implicit + >>?= fun () -> + Tx_rollup_ticket.parse_ticket_and_operation + ~consume_deserialization_gas + ~ticketer + ~contents + ~ty + ~source:source_contract + ~destination:(Contract destination) + ~entrypoint + ~amount ctxt - tx_rollup_ticket_hash - ~delta:(Z.neg @@ Tx_rollup_l2_qty.to_z amount) - >>=? fun (tx_ticket_hash_storage_diff, ctxt) -> - Ticket_balance.adjust_balance + >>=? fun (ctxt, ticket_token, op) -> + Tx_rollup_ticket.transfer_ticket ctxt - destination_ticket_hash - ~delta:(Tx_rollup_l2_qty.to_z amount) - >>=? fun (dest_ticket_hash_storage_diff, ctxt) -> - let delta = - Z.add tx_ticket_hash_storage_diff dest_ticket_hash_storage_diff - in - Tx_rollup_state.get ctxt tx_rollup >>=? fun (ctxt, state) -> - Tx_rollup_state.adjust_storage_allocation state ~delta - >>?= fun (state, ticket_paid_storage_size_diff) -> - let paid_storage_size_diff = - Z.add ticket_paid_storage_size_diff withdraw_paid_storage_size_diff - in - Tx_rollup_state.update ctxt tx_rollup state >>=? fun ctxt -> + ~src:(Contract source_contract) + ~dst:(Contract destination) + ticket_token + amount + >>=? fun (ctxt, paid_storage_size_diff) -> let result = - Tx_rollup_withdraw_result + Transfer_ticket_result { balance_updates = []; consumed_gas = Gas.consumed ~since:before_operation ~until:ctxt; @@ -1655,7 +1629,7 @@ let apply_external_manager_operation_content : ~message_position >>=? fun (ctxt, agreed_hash, rejected) -> let computed = - Tx_rollup_commitment.hash_message_result previous_message_result + Tx_rollup_message_result_hash.hash previous_message_result in fail_unless Tx_rollup_message_result_hash.(agreed_hash = computed) @@ -1890,23 +1864,23 @@ let precheck_manager_contents (type kind) ctxt (op : kind Kind.manager contents) Tx_rollup_errors.Message_size_exceeds_limit >>=? fun () -> return ctxt | Tx_rollup_commit _ | Tx_rollup_return_bond _ - | Tx_rollup_finalize_commitment _ | Tx_rollup_remove_commitment _ -> - assert_tx_rollup_feature_enabled ctxt >|=? fun () -> ctxt - | Tx_rollup_withdraw {withdraw_path; _} -> + | Tx_rollup_finalize_commitment _ | Tx_rollup_remove_commitment _ + | Transfer_ticket _ -> + assert_tx_rollup_feature_enabled ctxt >>=? fun () -> return ctxt + | Tx_rollup_dispatch_tickets {tickets_info; _} -> assert_tx_rollup_feature_enabled ctxt >>=? fun () -> let Constants.{tx_rollup_max_withdrawals_per_batch; _} = Constants.parametric ctxt in - let path_size = Tx_rollup_withdraw.Merkle.path_depth withdraw_path in - let maximum_path_size = - Tx_rollup_withdraw.maximum_path_depth - ~withdraw_count_limit:tx_rollup_max_withdrawals_per_batch - in - if Compare.Int.(path_size > maximum_path_size) then - fail - (Tx_rollup_errors.Wrong_withdraw_path_depth - {provided = path_size; limit = maximum_path_size}) - else return ctxt + error_when + Compare.List_length_with.(tickets_info = 0) + Tx_rollup_errors.No_withdrawals_to_dispatch + >>?= fun () -> + error_when + Compare.List_length_with.( + tickets_info > tx_rollup_max_withdrawals_per_batch) + Tx_rollup_errors.Too_many_withdrawals + >>?= fun () -> return ctxt | Tx_rollup_rejection {message_path; _} -> assert_tx_rollup_feature_enabled ctxt >>=? fun () -> let Constants.{tx_rollup_max_messages_per_inbox; _} = @@ -2031,9 +2005,9 @@ let burn_storage_fees : storage_limit, Tx_rollup_origination_result {payload with balance_updates} ) | Tx_rollup_return_bond_result _ | Tx_rollup_remove_commitment_result _ - | Tx_rollup_rejection_result _ -> + | Tx_rollup_rejection_result _ | Tx_rollup_dispatch_tickets_result _ -> return (ctxt, storage_limit, smopr) - | Tx_rollup_withdraw_result payload -> + | Transfer_ticket_result payload -> let consumed = payload.paid_storage_size_diff in Fees.burn_storage_fees ctxt ~storage_limit ~payer consumed >>=? fun (ctxt, storage_limit, storage_bus) -> @@ -2041,7 +2015,7 @@ let burn_storage_fees : return ( ctxt, storage_limit, - Tx_rollup_withdraw_result {payload with balance_updates} ) + Transfer_ticket_result {payload with balance_updates} ) | Tx_rollup_finalize_commitment_result payload -> let consumed = payload.paid_storage_size_diff in Fees.burn_storage_fees ctxt ~storage_limit ~payer consumed diff --git a/src/proto_alpha/lib_protocol/apply_results.ml b/src/proto_alpha/lib_protocol/apply_results.ml index 4e35cdd42129..cf8496975365 100644 --- a/src/proto_alpha/lib_protocol/apply_results.ml +++ b/src/proto_alpha/lib_protocol/apply_results.ml @@ -184,12 +184,18 @@ type _ successful_manager_operation_result = consumed_gas : Gas.Arith.fp; } -> Kind.tx_rollup_rejection successful_manager_operation_result - | Tx_rollup_withdraw_result : { + | Tx_rollup_dispatch_tickets_result : { balance_updates : Receipt.balance_updates; consumed_gas : Gas.Arith.fp; paid_storage_size_diff : Z.t; } - -> Kind.tx_rollup_withdraw successful_manager_operation_result + -> Kind.tx_rollup_dispatch_tickets successful_manager_operation_result + | Transfer_ticket_result : { + balance_updates : Receipt.balance_updates; + consumed_gas : Gas.Arith.fp; + paid_storage_size_diff : Z.t; + } + -> Kind.transfer_ticket successful_manager_operation_result | Sc_rollup_originate_result : { balance_updates : Receipt.balance_updates; address : Sc_rollup.Address.t; @@ -803,9 +809,10 @@ module Manager_result = struct Tx_rollup_rejection_result {balance_updates; consumed_gas = consumed_milligas}) - let[@coq_axiom_with_reason "gadt"] tx_rollup_withdraw_case = + let[@coq_axiom_with_reason "gadt"] tx_rollup_dispatch_tickets_case = make - ~op_case:Operation.Encoding.Manager_operations.tx_rollup_withdraw_case + ~op_case: + Operation.Encoding.Manager_operations.tx_rollup_dispatch_tickets_case ~encoding: Data_encoding.( obj4 @@ -814,12 +821,47 @@ module Manager_result = struct (dft "consumed_milligas" Gas.Arith.n_fp_encoding Gas.Arith.zero) (dft "paid_storage_size_diff" z Z.zero)) ~select:(function - | Successful_manager_result (Tx_rollup_withdraw_result _ as op) -> + | Successful_manager_result (Tx_rollup_dispatch_tickets_result _ as op) + -> Some op | _ -> None) - ~kind:Kind.Tx_rollup_withdraw_manager_kind + ~kind:Kind.Tx_rollup_dispatch_tickets_manager_kind + ~proj:(function + | Tx_rollup_dispatch_tickets_result + {balance_updates; consumed_gas; paid_storage_size_diff} -> + ( balance_updates, + Gas.Arith.ceil consumed_gas, + consumed_gas, + paid_storage_size_diff )) + ~inj: + (fun ( balance_updates, + consumed_gas, + consumed_milligas, + paid_storage_size_diff ) -> + assert (Gas.Arith.(equal (ceil consumed_milligas) consumed_gas)) ; + Tx_rollup_dispatch_tickets_result + { + balance_updates; + consumed_gas = consumed_milligas; + paid_storage_size_diff; + }) + + let[@coq_axiom_with_reason "gadt"] transfer_ticket_case = + make + ~op_case:Operation.Encoding.Manager_operations.transfer_ticket_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) + (dft "paid_storage_size_diff" z Z.zero)) + ~select:(function + | Successful_manager_result (Transfer_ticket_result _ as op) -> Some op + | _ -> None) + ~kind:Kind.Transfer_ticket_manager_kind ~proj:(function - | Tx_rollup_withdraw_result + | Transfer_ticket_result {balance_updates; consumed_gas; paid_storage_size_diff} -> ( balance_updates, Gas.Arith.ceil consumed_gas, @@ -831,7 +873,7 @@ module Manager_result = struct consumed_milligas, paid_storage_size_diff ) -> assert (Gas.Arith.(equal (ceil consumed_milligas) consumed_gas)) ; - Tx_rollup_withdraw_result + Transfer_ticket_result { balance_updates; consumed_gas = consumed_milligas; @@ -1225,10 +1267,13 @@ let equal_manager_kind : Kind.Tx_rollup_rejection_manager_kind ) -> Some Eq | (Kind.Tx_rollup_rejection_manager_kind, _) -> None - | (Kind.Tx_rollup_withdraw_manager_kind, Kind.Tx_rollup_withdraw_manager_kind) - -> + | ( Kind.Tx_rollup_dispatch_tickets_manager_kind, + Kind.Tx_rollup_dispatch_tickets_manager_kind ) -> + Some Eq + | (Kind.Tx_rollup_dispatch_tickets_manager_kind, _) -> None + | (Kind.Transfer_ticket_manager_kind, Kind.Transfer_ticket_manager_kind) -> Some Eq - | (Kind.Tx_rollup_withdraw_manager_kind, _) -> None + | (Kind.Transfer_ticket_manager_kind, _) -> None | ( Kind.Sc_rollup_originate_manager_kind, Kind.Sc_rollup_originate_manager_kind ) -> Some Eq @@ -1674,17 +1719,29 @@ module Encoding = struct Some (op, res) | _ -> None) - let[@coq_axiom_with_reason "gadt"] tx_rollup_withdraw_case = + let[@coq_axiom_with_reason "gadt"] tx_rollup_dispatch_tickets_case = make_manager_case - Operation.Encoding.tx_rollup_withdraw_case - Manager_result.tx_rollup_withdraw_case + Operation.Encoding.tx_rollup_dispatch_tickets_case + Manager_result.tx_rollup_dispatch_tickets_case (function | Contents_and_result - ( (Manager_operation {operation = Tx_rollup_withdraw _; _} as op), + ( (Manager_operation {operation = Tx_rollup_dispatch_tickets _; _} + as op), res ) -> Some (op, res) | _ -> None) + let[@coq_axiom_with_reason "gadt"] transfer_ticket_case = + make_manager_case + Operation.Encoding.transfer_ticket_case + Manager_result.transfer_ticket_case + (function + | Contents_and_result + ((Manager_operation {operation = Transfer_ticket _; _} as op), res) + -> + Some (op, res) + | _ -> None) + let[@coq_axiom_with_reason "gadt"] sc_rollup_originate_case = make_manager_case Operation.Encoding.sc_rollup_originate_case @@ -1771,7 +1828,8 @@ let contents_result_encoding = make tx_rollup_finalize_commitment_case; make tx_rollup_remove_commitment_case; make tx_rollup_rejection_case; - make tx_rollup_withdraw_case; + make tx_rollup_dispatch_tickets_case; + make transfer_ticket_case; make sc_rollup_originate_case; make sc_rollup_add_messages_case; make sc_rollup_cement_case; @@ -1824,6 +1882,8 @@ let contents_and_result_encoding = make tx_rollup_finalize_commitment_case; make tx_rollup_remove_commitment_case; make tx_rollup_rejection_case; + make transfer_ticket_case; + make tx_rollup_dispatch_tickets_case; make sc_rollup_originate_case; make sc_rollup_add_messages_case; make sc_rollup_cement_case; @@ -2299,32 +2359,61 @@ let kind_equal : } ) -> Some Eq | (Manager_operation {operation = Tx_rollup_rejection _; _}, _) -> None - | ( Manager_operation {operation = Tx_rollup_withdraw _; _}, + | ( Manager_operation {operation = Tx_rollup_dispatch_tickets _; _}, Manager_operation_result - {operation_result = Applied (Tx_rollup_withdraw_result _); _} ) -> + {operation_result = Applied (Tx_rollup_dispatch_tickets_result _); _} ) + -> Some Eq - | ( Manager_operation {operation = Tx_rollup_withdraw _; _}, + | ( Manager_operation {operation = Tx_rollup_dispatch_tickets _; _}, Manager_operation_result - {operation_result = Backtracked (Tx_rollup_withdraw_result _, _); _} ) - -> + { + operation_result = Backtracked (Tx_rollup_dispatch_tickets_result _, _); + _; + } ) -> + Some Eq + | ( Manager_operation {operation = Tx_rollup_dispatch_tickets _; _}, + Manager_operation_result + { + operation_result = + Failed + (Alpha_context.Kind.Tx_rollup_dispatch_tickets_manager_kind, _); + _; + } ) -> + Some Eq + | ( Manager_operation {operation = Tx_rollup_dispatch_tickets _; _}, + Manager_operation_result + { + operation_result = + Skipped Alpha_context.Kind.Tx_rollup_dispatch_tickets_manager_kind; + _; + } ) -> + Some Eq + | (Manager_operation {operation = Tx_rollup_dispatch_tickets _; _}, _) -> None + | ( Manager_operation {operation = Transfer_ticket _; _}, + Manager_operation_result + {operation_result = Applied (Transfer_ticket_result _); _} ) -> + Some Eq + | ( Manager_operation {operation = Transfer_ticket _; _}, + Manager_operation_result + {operation_result = Backtracked (Transfer_ticket_result _, _); _} ) -> Some Eq - | ( Manager_operation {operation = Tx_rollup_withdraw _; _}, + | ( Manager_operation {operation = Transfer_ticket _; _}, Manager_operation_result { operation_result = - Failed (Alpha_context.Kind.Tx_rollup_withdraw_manager_kind, _); + Failed (Alpha_context.Kind.Transfer_ticket_manager_kind, _); _; } ) -> Some Eq - | ( Manager_operation {operation = Tx_rollup_withdraw _; _}, + | ( Manager_operation {operation = Transfer_ticket _; _}, Manager_operation_result { operation_result = - Skipped Alpha_context.Kind.Tx_rollup_withdraw_manager_kind; + Skipped Alpha_context.Kind.Transfer_ticket_manager_kind; _; } ) -> Some Eq - | (Manager_operation {operation = Tx_rollup_withdraw _; _}, _) -> None + | (Manager_operation {operation = Transfer_ticket _; _}, _) -> 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 a311800bff7c..b7d476a17b28 100644 --- a/src/proto_alpha/lib_protocol/apply_results.mli +++ b/src/proto_alpha/lib_protocol/apply_results.mli @@ -240,12 +240,18 @@ and _ successful_manager_operation_result = consumed_gas : Gas.Arith.fp; } -> Kind.tx_rollup_rejection successful_manager_operation_result - | Tx_rollup_withdraw_result : { + | Tx_rollup_dispatch_tickets_result : { balance_updates : Receipt.balance_updates; consumed_gas : Gas.Arith.fp; paid_storage_size_diff : Z.t; } - -> Kind.tx_rollup_withdraw successful_manager_operation_result + -> Kind.tx_rollup_dispatch_tickets successful_manager_operation_result + | Transfer_ticket_result : { + balance_updates : Receipt.balance_updates; + consumed_gas : Gas.Arith.fp; + paid_storage_size_diff : Z.t; + } + -> Kind.transfer_ticket 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/dune.inc b/src/proto_alpha/lib_protocol/dune.inc index 3afe6d605a32..e9f292fcd6c2 100644 --- a/src/proto_alpha/lib_protocol/dune.inc +++ b/src/proto_alpha/lib_protocol/dune.inc @@ -80,8 +80,12 @@ module CamlinternalFormatBasics = struct include CamlinternalFormatBasics end tx_rollup_l2_context_hash.mli tx_rollup_l2_context_hash.ml tx_rollup_repr.mli tx_rollup_repr.ml tx_rollup_withdraw_repr.mli tx_rollup_withdraw_repr.ml + tx_rollup_withdraw_list_hash_repr.mli tx_rollup_withdraw_list_hash_repr.ml + tx_rollup_reveal_repr.mli tx_rollup_reveal_repr.ml tx_rollup_message_repr.mli tx_rollup_message_repr.ml tx_rollup_inbox_repr.mli tx_rollup_inbox_repr.ml + tx_rollup_message_result_repr.mli tx_rollup_message_result_repr.ml + tx_rollup_message_result_hash_repr.mli tx_rollup_message_result_hash_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 @@ -138,7 +142,7 @@ module CamlinternalFormatBasics = struct include CamlinternalFormatBasics end global_constants_costs.mli global_constants_costs.ml global_constants_storage.mli global_constants_storage.ml tx_rollup_state_storage.mli tx_rollup_state_storage.ml - tx_rollup_withdraw_storage.mli tx_rollup_withdraw_storage.ml + tx_rollup_reveal_storage.mli tx_rollup_reveal_storage.ml tx_rollup_inbox_storage.mli tx_rollup_inbox_storage.ml tx_rollup_commitment_storage.mli tx_rollup_commitment_storage.ml tx_rollup_storage.mli tx_rollup_storage.ml @@ -182,6 +186,7 @@ module CamlinternalFormatBasics = struct include CamlinternalFormatBasics end ticket_token_map.mli ticket_token_map.ml ticket_operations_diff.mli ticket_operations_diff.ml ticket_accounting.mli ticket_accounting.ml + tx_rollup_ticket.mli tx_rollup_ticket.ml script_interpreter_defs.ml script_interpreter.mli script_interpreter.ml sc_rollup_operations.mli sc_rollup_operations.ml @@ -261,8 +266,12 @@ module CamlinternalFormatBasics = struct include CamlinternalFormatBasics end tx_rollup_l2_context_hash.mli tx_rollup_l2_context_hash.ml tx_rollup_repr.mli tx_rollup_repr.ml tx_rollup_withdraw_repr.mli tx_rollup_withdraw_repr.ml + tx_rollup_withdraw_list_hash_repr.mli tx_rollup_withdraw_list_hash_repr.ml + tx_rollup_reveal_repr.mli tx_rollup_reveal_repr.ml tx_rollup_message_repr.mli tx_rollup_message_repr.ml tx_rollup_inbox_repr.mli tx_rollup_inbox_repr.ml + tx_rollup_message_result_repr.mli tx_rollup_message_result_repr.ml + tx_rollup_message_result_hash_repr.mli tx_rollup_message_result_hash_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 @@ -319,7 +328,7 @@ module CamlinternalFormatBasics = struct include CamlinternalFormatBasics end global_constants_costs.mli global_constants_costs.ml global_constants_storage.mli global_constants_storage.ml tx_rollup_state_storage.mli tx_rollup_state_storage.ml - tx_rollup_withdraw_storage.mli tx_rollup_withdraw_storage.ml + tx_rollup_reveal_storage.mli tx_rollup_reveal_storage.ml tx_rollup_inbox_storage.mli tx_rollup_inbox_storage.ml tx_rollup_commitment_storage.mli tx_rollup_commitment_storage.ml tx_rollup_storage.mli tx_rollup_storage.ml @@ -363,6 +372,7 @@ module CamlinternalFormatBasics = struct include CamlinternalFormatBasics end ticket_token_map.mli ticket_token_map.ml ticket_operations_diff.mli ticket_operations_diff.ml ticket_accounting.mli ticket_accounting.ml + tx_rollup_ticket.mli tx_rollup_ticket.ml script_interpreter_defs.ml script_interpreter.mli script_interpreter.ml sc_rollup_operations.mli sc_rollup_operations.ml @@ -442,8 +452,12 @@ module CamlinternalFormatBasics = struct include CamlinternalFormatBasics end tx_rollup_l2_context_hash.mli tx_rollup_l2_context_hash.ml tx_rollup_repr.mli tx_rollup_repr.ml tx_rollup_withdraw_repr.mli tx_rollup_withdraw_repr.ml + tx_rollup_withdraw_list_hash_repr.mli tx_rollup_withdraw_list_hash_repr.ml + tx_rollup_reveal_repr.mli tx_rollup_reveal_repr.ml tx_rollup_message_repr.mli tx_rollup_message_repr.ml tx_rollup_inbox_repr.mli tx_rollup_inbox_repr.ml + tx_rollup_message_result_repr.mli tx_rollup_message_result_repr.ml + tx_rollup_message_result_hash_repr.mli tx_rollup_message_result_hash_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 @@ -500,7 +514,7 @@ module CamlinternalFormatBasics = struct include CamlinternalFormatBasics end global_constants_costs.mli global_constants_costs.ml global_constants_storage.mli global_constants_storage.ml tx_rollup_state_storage.mli tx_rollup_state_storage.ml - tx_rollup_withdraw_storage.mli tx_rollup_withdraw_storage.ml + tx_rollup_reveal_storage.mli tx_rollup_reveal_storage.ml tx_rollup_inbox_storage.mli tx_rollup_inbox_storage.ml tx_rollup_commitment_storage.mli tx_rollup_commitment_storage.ml tx_rollup_storage.mli tx_rollup_storage.ml @@ -544,6 +558,7 @@ module CamlinternalFormatBasics = struct include CamlinternalFormatBasics end ticket_token_map.mli ticket_token_map.ml ticket_operations_diff.mli ticket_operations_diff.ml ticket_accounting.mli ticket_accounting.ml + tx_rollup_ticket.mli tx_rollup_ticket.ml script_interpreter_defs.ml script_interpreter.mli script_interpreter.ml sc_rollup_operations.mli sc_rollup_operations.ml @@ -645,8 +660,12 @@ include Tezos_raw_protocol_alpha.Main Tx_rollup_l2_context_hash Tx_rollup_repr Tx_rollup_withdraw_repr + Tx_rollup_withdraw_list_hash_repr + Tx_rollup_reveal_repr Tx_rollup_message_repr Tx_rollup_inbox_repr + Tx_rollup_message_result_repr + Tx_rollup_message_result_hash_repr Tx_rollup_commitment_repr Tx_rollup_errors_repr Tx_rollup_state_repr @@ -703,7 +722,7 @@ include Tezos_raw_protocol_alpha.Main Global_constants_costs Global_constants_storage Tx_rollup_state_storage - Tx_rollup_withdraw_storage + Tx_rollup_reveal_storage Tx_rollup_inbox_storage Tx_rollup_commitment_storage Tx_rollup_storage @@ -747,6 +766,7 @@ include Tezos_raw_protocol_alpha.Main Ticket_token_map Ticket_operations_diff Ticket_accounting + Tx_rollup_ticket Script_interpreter_defs Script_interpreter Sc_rollup_operations @@ -867,8 +887,12 @@ include Tezos_raw_protocol_alpha.Main tx_rollup_l2_context_hash.mli tx_rollup_l2_context_hash.ml tx_rollup_repr.mli tx_rollup_repr.ml tx_rollup_withdraw_repr.mli tx_rollup_withdraw_repr.ml + tx_rollup_withdraw_list_hash_repr.mli tx_rollup_withdraw_list_hash_repr.ml + tx_rollup_reveal_repr.mli tx_rollup_reveal_repr.ml tx_rollup_message_repr.mli tx_rollup_message_repr.ml tx_rollup_inbox_repr.mli tx_rollup_inbox_repr.ml + tx_rollup_message_result_repr.mli tx_rollup_message_result_repr.ml + tx_rollup_message_result_hash_repr.mli tx_rollup_message_result_hash_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 @@ -925,7 +949,7 @@ include Tezos_raw_protocol_alpha.Main global_constants_costs.mli global_constants_costs.ml global_constants_storage.mli global_constants_storage.ml tx_rollup_state_storage.mli tx_rollup_state_storage.ml - tx_rollup_withdraw_storage.mli tx_rollup_withdraw_storage.ml + tx_rollup_reveal_storage.mli tx_rollup_reveal_storage.ml tx_rollup_inbox_storage.mli tx_rollup_inbox_storage.ml tx_rollup_commitment_storage.mli tx_rollup_commitment_storage.ml tx_rollup_storage.mli tx_rollup_storage.ml @@ -969,6 +993,7 @@ include Tezos_raw_protocol_alpha.Main ticket_token_map.mli ticket_token_map.ml ticket_operations_diff.mli ticket_operations_diff.ml ticket_accounting.mli ticket_accounting.ml + tx_rollup_ticket.mli tx_rollup_ticket.ml script_interpreter_defs.ml script_interpreter.mli script_interpreter.ml sc_rollup_operations.mli sc_rollup_operations.ml diff --git a/src/proto_alpha/lib_protocol/operation_repr.ml b/src/proto_alpha/lib_protocol/operation_repr.ml index e2805c4506e1..f2a07443e88f 100644 --- a/src/proto_alpha/lib_protocol/operation_repr.ml +++ b/src/proto_alpha/lib_protocol/operation_repr.ml @@ -85,7 +85,9 @@ module Kind = struct type tx_rollup_rejection = Tx_rollup_rejection_kind - type tx_rollup_withdraw = Tx_rollup_withdraw_kind + type tx_rollup_dispatch_tickets = Tx_rollup_dispatch_tickets_kind + + type transfer_ticket = Transfer_ticket_kind type sc_rollup_originate = Sc_rollup_originate_kind @@ -111,7 +113,9 @@ module Kind = struct | Tx_rollup_remove_commitment_manager_kind : tx_rollup_remove_commitment manager | Tx_rollup_rejection_manager_kind : tx_rollup_rejection manager - | Tx_rollup_withdraw_manager_kind : tx_rollup_withdraw manager + | Tx_rollup_dispatch_tickets_manager_kind + : tx_rollup_dispatch_tickets manager + | Transfer_ticket_manager_kind : transfer_ticket manager | Sc_rollup_originate_manager_kind : sc_rollup_originate manager | Sc_rollup_add_messages_manager_kind : sc_rollup_add_messages manager | Sc_rollup_cement_manager_kind : sc_rollup_cement manager @@ -324,26 +328,27 @@ and _ manager_operation = message : Tx_rollup_message_repr.t; message_position : int; message_path : Tx_rollup_inbox_repr.Merkle.path; - previous_message_result : Tx_rollup_commitment_repr.message_result; + previous_message_result : Tx_rollup_message_result_repr.t; proof : Tx_rollup_l2_proof.t; } -> Kind.tx_rollup_rejection manager_operation - | Tx_rollup_withdraw : { + | Tx_rollup_dispatch_tickets : { tx_rollup : Tx_rollup_repr.t; level : Tx_rollup_level_repr.t; context_hash : Context_hash.t; message_index : int; - withdrawals_merkle_root : Tx_rollup_withdraw_repr.Merkle.root; - withdraw_path : Tx_rollup_withdraw_repr.Merkle.path; - withdraw_position : int; + tickets_info : Tx_rollup_reveal_repr.t list; + } + -> Kind.tx_rollup_dispatch_tickets manager_operation + | Transfer_ticket : { contents : Script_repr.lazy_expr; ty : Script_repr.lazy_expr; ticketer : Contract_repr.t; - amount : Tx_rollup_l2_qty.t; + amount : Z.t; destination : Contract_repr.t; entrypoint : Entrypoint_repr.t; } - -> Kind.tx_rollup_withdraw manager_operation + -> Kind.transfer_ticket manager_operation | Sc_rollup_originate : { kind : Sc_rollup_repr.Kind.t; boot_sector : string; @@ -384,7 +389,8 @@ let manager_kind : type kind. kind manager_operation -> kind Kind.manager = | Tx_rollup_remove_commitment _ -> Kind.Tx_rollup_remove_commitment_manager_kind | Tx_rollup_rejection _ -> Kind.Tx_rollup_rejection_manager_kind - | Tx_rollup_withdraw _ -> Kind.Tx_rollup_withdraw_manager_kind + | Tx_rollup_dispatch_tickets _ -> Kind.Tx_rollup_dispatch_tickets_manager_kind + | Transfer_ticket _ -> Kind.Transfer_ticket_manager_kind | Sc_rollup_originate _ -> Kind.Sc_rollup_originate_manager_kind | Sc_rollup_add_messages _ -> Kind.Sc_rollup_add_messages_manager_kind | Sc_rollup_cement _ -> Kind.Sc_rollup_cement_manager_kind @@ -457,7 +463,10 @@ let tx_rollup_operation_remove_commitment_tag = let tx_rollup_operation_rejection_tag = tx_rollup_operation_tag_offset + 6 -let tx_rollup_operation_withdraw_tag = tx_rollup_operation_tag_offset + 7 +let tx_rollup_operation_dispatch_tickets_tag = + tx_rollup_operation_tag_offset + 7 + +let transfer_ticket_tag = tx_rollup_operation_tag_offset + 8 let sc_rollup_operation_tag_offset = 200 @@ -724,7 +733,7 @@ module Encoding = struct (req "message_path" Tx_rollup_inbox_repr.Merkle.path_encoding) (req "previous_message_result" - Tx_rollup_commitment_repr.message_result_encoding) + Tx_rollup_message_result_repr.encoding) (req "proof" Tx_rollup_l2_proof.encoding); select = (function @@ -768,92 +777,60 @@ module Encoding = struct }); } - let[@coq_axiom_with_reason "gadt"] tx_rollup_withdraw_case = + let[@coq_axiom_with_reason "gadt"] tx_rollup_dispatch_tickets_case = MCase { - tag = tx_rollup_operation_withdraw_tag; - name = "tx_rollup_withdraw"; + tag = tx_rollup_operation_dispatch_tickets_tag; + name = "tx_rollup_dispatch_tickets"; encoding = - merge_objs - (obj10 - (req "tx_rollup" Tx_rollup_repr.encoding) - (req "level" Tx_rollup_level_repr.encoding) - (req "context_hash" Context_hash.encoding) - (req "message_index" int31) - (req - "withdrawals_merkle_root" - Tx_rollup_withdraw_repr.Merkle.root_encoding) - (req - "withdraw_path" - Tx_rollup_withdraw_repr.Merkle.path_encoding) - (req "withdraw_position" int31) - (req "ticket_contents" Script_repr.lazy_expr_encoding) - (req "ticket_ty" Script_repr.lazy_expr_encoding) - (req "ticket_ticketer" Contract_repr.encoding)) - (obj3 - (req "ticket_amount" Tx_rollup_l2_qty.encoding) - (req "destination" Contract_repr.encoding) - (req "entrypoint" Entrypoint_repr.simple_encoding)); + obj5 + (req "tx_rollup" Tx_rollup_repr.encoding) + (req "level" Tx_rollup_level_repr.encoding) + (req "context_hash" Context_hash.encoding) + (req "message_index" int31) + (req + "tickets_info" + (Data_encoding.list Tx_rollup_reveal_repr.encoding)); select = (function - | Manager (Tx_rollup_withdraw _ as op) -> Some op | _ -> None); + | Manager (Tx_rollup_dispatch_tickets _ as op) -> Some op + | _ -> None); proj = (function - | Tx_rollup_withdraw - { - tx_rollup; - level; - context_hash; - message_index; - withdrawals_merkle_root; - withdraw_path; - withdraw_position; - contents; - ty; - ticketer; - amount; - destination; - entrypoint; - } -> - ( ( tx_rollup, - level, - context_hash, - message_index, - withdrawals_merkle_root, - withdraw_path, - withdraw_position, - contents, - ty, - ticketer ), - (amount, destination, entrypoint) )); + | Tx_rollup_dispatch_tickets + {tx_rollup; level; context_hash; message_index; tickets_info} -> + (tx_rollup, level, context_hash, message_index, tickets_info)); inj = - (fun ( ( tx_rollup, - level, - context_hash, - message_index, - withdrawals_merkle_root, - withdraw_path, - withdraw_position, - contents, - ty, - ticketer ), - (amount, destination, entrypoint) ) -> - Tx_rollup_withdraw - { - tx_rollup; - level; - context_hash; - message_index; - withdrawals_merkle_root; - withdraw_path; - withdraw_position; - contents; - ty; - ticketer; - amount; - destination; - entrypoint; - }); + (fun (tx_rollup, level, context_hash, message_index, tickets_info) -> + Tx_rollup_dispatch_tickets + {tx_rollup; level; context_hash; message_index; tickets_info}); + } + + let[@coq_axiom_with_reason "gadt"] transfer_ticket_case = + MCase + { + tag = transfer_ticket_tag; + name = "transfer_ticket"; + encoding = + obj6 + (req "ticket_contents" Script_repr.lazy_expr_encoding) + (req "ticket_ty" Script_repr.lazy_expr_encoding) + (req "ticket_ticketer" Contract_repr.encoding) + (req "ticket_amount" n) + (req "destination" Contract_repr.encoding) + (req "entrypoint" Entrypoint_repr.simple_encoding); + select = + (function + | Manager (Transfer_ticket _ as op) -> Some op | _ -> None); + proj = + (function + | Transfer_ticket + {contents; ty; ticketer; amount; destination; entrypoint} -> + (contents, ty, ticketer, amount, destination, entrypoint)); + inj = + (fun (contents, ty, ticketer, amount, destination, entrypoint) -> + Transfer_ticket + {contents; ty; ticketer; amount; destination; entrypoint}); } let[@coq_axiom_with_reason "gadt"] sc_rollup_originate_case = @@ -1262,10 +1239,15 @@ module Encoding = struct tx_rollup_operation_rejection_tag Manager_operations.tx_rollup_rejection_case - let tx_rollup_withdraw_case = + let tx_rollup_dispatch_tickets_case = + make_manager_case + tx_rollup_operation_dispatch_tickets_tag + Manager_operations.tx_rollup_dispatch_tickets_case + + let transfer_ticket_case = make_manager_case - tx_rollup_operation_withdraw_tag - Manager_operations.tx_rollup_withdraw_case + transfer_ticket_tag + Manager_operations.transfer_ticket_case let sc_rollup_originate_case = make_manager_case @@ -1322,7 +1304,8 @@ module Encoding = struct make tx_rollup_finalize_commitment_case; make tx_rollup_remove_commitment_case; make tx_rollup_rejection_case; - make tx_rollup_withdraw_case; + make tx_rollup_dispatch_tickets_case; + make transfer_ticket_case; make sc_rollup_originate_case; make sc_rollup_add_messages_case; make sc_rollup_cement_case; @@ -1528,8 +1511,10 @@ let equal_manager_operation_kind : | (Tx_rollup_remove_commitment _, _) -> None | (Tx_rollup_rejection _, Tx_rollup_rejection _) -> Some Eq | (Tx_rollup_rejection _, _) -> None - | (Tx_rollup_withdraw _, Tx_rollup_withdraw _) -> Some Eq - | (Tx_rollup_withdraw _, _) -> None + | (Tx_rollup_dispatch_tickets _, Tx_rollup_dispatch_tickets _) -> Some Eq + | (Tx_rollup_dispatch_tickets _, _) -> None + | (Transfer_ticket _, Transfer_ticket _) -> Some Eq + | (Transfer_ticket _, _) -> None | (Sc_rollup_originate _, Sc_rollup_originate _) -> Some Eq | (Sc_rollup_originate _, _) -> None | (Sc_rollup_add_messages _, Sc_rollup_add_messages _) -> Some Eq diff --git a/src/proto_alpha/lib_protocol/operation_repr.mli b/src/proto_alpha/lib_protocol/operation_repr.mli index 5fafe68f10d5..6aee0ae55895 100644 --- a/src/proto_alpha/lib_protocol/operation_repr.mli +++ b/src/proto_alpha/lib_protocol/operation_repr.mli @@ -46,6 +46,7 @@ - tx rollup batch submission - tx rollup commit - tx rollup withdraw + - tx rollup reveal withdrawals - smart contract rollup origination Each of them can be encoded as raw bytes. Operations are distinguished at @@ -113,7 +114,9 @@ module Kind : sig type tx_rollup_rejection = Tx_rollup_rejection_kind - type tx_rollup_withdraw = Tx_rollup_withdraw_kind + type tx_rollup_dispatch_tickets = Tx_rollup_dispatch_tickets_kind + + type transfer_ticket = Transfer_ticket_kind type sc_rollup_originate = Sc_rollup_originate_kind @@ -139,7 +142,9 @@ module Kind : sig | Tx_rollup_remove_commitment_manager_kind : tx_rollup_remove_commitment manager | Tx_rollup_rejection_manager_kind : tx_rollup_rejection manager - | Tx_rollup_withdraw_manager_kind : tx_rollup_withdraw manager + | Tx_rollup_dispatch_tickets_manager_kind + : tx_rollup_dispatch_tickets manager + | Transfer_ticket_manager_kind : transfer_ticket manager | Sc_rollup_originate_manager_kind : sc_rollup_originate manager | Sc_rollup_add_messages_manager_kind : sc_rollup_add_messages manager | Sc_rollup_cement_manager_kind : sc_rollup_cement manager @@ -369,19 +374,11 @@ and _ manager_operation = message : Tx_rollup_message_repr.t; message_position : int; message_path : Tx_rollup_inbox_repr.Merkle.path; - previous_message_result : Tx_rollup_commitment_repr.message_result; + previous_message_result : Tx_rollup_message_result_repr.t; proof : Tx_rollup_l2_proof.t; } -> Kind.tx_rollup_rejection manager_operation - (** [Tx_rollup_withdraw] allows an implicit account (the "claimer") to - receive [amount] tickets, pulled out of [tx_rollup], to the - [entrypoint] of the smart contract [destination]. - - The ticket must have been addressed to the - claimer, who must be the source of this operation. It must have been - pulled out at [level] and from the message at [message_index]. The ticket - is composed of [ticketer; ty; contents]. *) - | Tx_rollup_withdraw : { + | Tx_rollup_dispatch_tickets : { tx_rollup : Tx_rollup_repr.t; (** The rollup from where the tickets are retrieved *) level : Tx_rollup_level_repr.t; @@ -391,18 +388,23 @@ and _ manager_operation = inbox from where this withdrawal was enabled. *) message_index : int; (** Index of the message in the inbox at [level] where this withdrawal was enabled. *) - withdrawals_merkle_root : Tx_rollup_withdraw_repr.Merkle.root; - (** The root hash of the list of withdrawals.*) - withdraw_path : Tx_rollup_withdraw_repr.Merkle.path; - (** The proof that this withdraw is indeed included in - commitment for [tx_rollup] at [level] with [context_hash]. *) - withdraw_position : int; - (** Index of [withdrawal] in the message result of message at [message_index]. *) + tickets_info : Tx_rollup_reveal_repr.t list; + } + -> Kind.tx_rollup_dispatch_tickets manager_operation + (** [Transfer_ticket] allows an implicit account (the "claimer") to + receive [amount] tickets, pulled out of [tx_rollup], to the + [entrypoint] of the smart contract [destination]. + + The ticket must have been addressed to the + claimer, who must be the source of this operation. It must have been + pulled out at [level] and from the message at [message_index]. The ticket + is composed of [ticketer; ty; contents]. *) + | Transfer_ticket : { contents : Script_repr.lazy_expr; (** Contents of the withdrawn ticket *) ty : Script_repr.lazy_expr; (** Type of the withdrawn ticket's contents *) ticketer : Contract_repr.t; (** Ticketer of the withdrawn ticket *) - amount : Tx_rollup_l2_qty.t; + amount : Z.t; (** Quantity of the withdrawn ticket. Must match the amount that was enabled. *) destination : Contract_repr.t; @@ -410,7 +412,7 @@ and _ manager_operation = entrypoint : Entrypoint_repr.t; (** The entrypoint of the smart contract address that should receive the tickets. *) } - -> Kind.tx_rollup_withdraw manager_operation + -> Kind.transfer_ticket manager_operation (* [Sc_rollup_originate] allows an implicit account to originate a new smart contract rollup (initialized with a given boot sector). *) @@ -563,7 +565,10 @@ module Encoding : sig val tx_rollup_rejection_case : Kind.tx_rollup_rejection Kind.manager case - val tx_rollup_withdraw_case : Kind.tx_rollup_withdraw Kind.manager case + val tx_rollup_dispatch_tickets_case : + Kind.tx_rollup_dispatch_tickets Kind.manager case + + val transfer_ticket_case : Kind.transfer_ticket Kind.manager case val sc_rollup_originate_case : Kind.sc_rollup_originate Kind.manager case @@ -619,7 +624,9 @@ module Encoding : sig val tx_rollup_rejection_case : Kind.tx_rollup_rejection case - val tx_rollup_withdraw_case : Kind.tx_rollup_withdraw case + val tx_rollup_dispatch_tickets_case : Kind.tx_rollup_dispatch_tickets case + + val transfer_ticket_case : Kind.transfer_ticket case val sc_rollup_originate_case : Kind.sc_rollup_originate case diff --git a/src/proto_alpha/lib_protocol/storage.ml b/src/proto_alpha/lib_protocol/storage.ml index 3c76ada84c2f..5a114f840427 100644 --- a/src/proto_alpha/lib_protocol/storage.ml +++ b/src/proto_alpha/lib_protocol/storage.ml @@ -1464,32 +1464,12 @@ module Tx_rollup = struct let encoding = Tx_rollup_inbox_repr.encoding end) - module Int32_index = struct - type t = int32 - - let compare = Compare.Int32.compare - - let encoding = Data_encoding.int32 - - let rpc_arg = RPC_arg.int32 - - let path_length = 1 - - let to_path i l = Int32.to_string i :: l - - let of_path = function - | [] | _ :: _ :: _ -> None - | [i] -> Int32.of_string_opt i - end - - module Consumed_withdraw = - Make_indexed_carbonated_data_storage - (Make_subcontext (Registered) (Level_tx_rollup_context.Raw_context) - (struct - let name = ["withdraw"] - end)) - (Make_index (Int32_index)) - (Tx_rollup_withdraw_repr.Withdrawal_accounting) + module Revealed_withdrawals = + Level_tx_rollup_context.Make_carbonated_map + (struct + let name = ["revealed_withdrawals"] + end) + (Bitset) module Level_indexed_context = Make_indexed_subcontext diff --git a/src/proto_alpha/lib_protocol/storage.mli b/src/proto_alpha/lib_protocol/storage.mli index d4fc265cc4ac..39dca57bc686 100644 --- a/src/proto_alpha/lib_protocol/storage.mli +++ b/src/proto_alpha/lib_protocol/storage.mli @@ -637,18 +637,17 @@ module Tx_rollup : sig and type key = Tx_rollup_repr.t and type value = Tx_rollup_inbox_repr.t - (** A carbonated storage of the set of withdrawals consumed - of those potentially associated to each message - of an inbox. The key is the message number, which is - sequentially assigned from 0. *) - module Consumed_withdraw : + (** A carbonated storage of the set of withdrawals revealed of those + potentially associated to each message of an inbox. The key is the message + number, which is sequentially assigned from 0. *) + module Revealed_withdrawals : Non_iterable_indexed_carbonated_data_storage - with type t := (Raw_context.t * Tx_rollup_level_repr.t) * Tx_rollup_repr.t - and type key = int32 - and type value = Tx_rollup_withdraw_repr.Withdrawal_accounting.t + with type t := Raw_context.t * Tx_rollup_level_repr.t + and type key = Tx_rollup_repr.t + and type value = Bitset.t (** A rollup can have at most one commitment per rollup level. Some - metadata are saved in addition to the commitment itself. See + metadata are saved in addition to the commitment itself. See {!Tx_rollup_commitment_repr.Submitted_commitment.t} for the exact content. *) module Commitment : diff --git a/src/proto_alpha/lib_protocol/test/helpers/block.ml b/src/proto_alpha/lib_protocol/test/helpers/block.ml index 09bbbe565c69..08d3961a3b2a 100644 --- a/src/proto_alpha/lib_protocol/test/helpers/block.ml +++ b/src/proto_alpha/lib_protocol/test/helpers/block.ml @@ -713,7 +713,8 @@ let bake_n_with_all_balance_updates ?(baking_mode = Application) ?policy | Tx_rollup_return_bond_result _ | Tx_rollup_finalize_commitment_result _ | Tx_rollup_remove_commitment_result _ - | Tx_rollup_rejection_result _ | Tx_rollup_withdraw_result _ + | Tx_rollup_rejection_result _ | Transfer_ticket_result _ + | Tx_rollup_dispatch_tickets_result _ | Sc_rollup_originate_result _ | Sc_rollup_add_messages_result _ | Sc_rollup_cement_result _ | Sc_rollup_publish_result _ -> balance_updates_rev @@ -753,7 +754,8 @@ let bake_n_with_origination_results ?(baking_mode = Application) ?policy n b = | 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 (Tx_rollup_withdraw_result _) + | Successful_manager_result (Tx_rollup_dispatch_tickets_result _) + | Successful_manager_result (Transfer_ticket_result _) | Successful_manager_result (Sc_rollup_originate_result _) | Successful_manager_result (Sc_rollup_add_messages_result _) | Successful_manager_result (Sc_rollup_cement_result _) diff --git a/src/proto_alpha/lib_protocol/test/helpers/op.ml b/src/proto_alpha/lib_protocol/test/helpers/op.ml index b16493a940a1..4606ec959a07 100644 --- a/src/proto_alpha/lib_protocol/test/helpers/op.ml +++ b/src/proto_alpha/lib_protocol/test/helpers/op.ml @@ -595,10 +595,9 @@ let tx_rollup_remove_commitment ?counter ?fee ?gas_limit ?storage_limit ctxt Context.Contract.manager ctxt source >|=? fun account -> sign account.sk ctxt to_sign_op -let tx_rollup_withdraw ?counter ?fee ?gas_limit ?storage_limit ctxt - ~(source : Contract.t) (tx_rollup : Tx_rollup.t) (level : Tx_rollup_level.t) - ~context_hash ~message_index ~contents ~ty ~ticketer amount ~destination - ~withdraw_position withdrawals_merkle_root withdraw_path entrypoint = +let tx_rollup_dispatch_tickets ?counter ?fee ?gas_limit ?storage_limit ctxt + ~(source : Contract.t) ~message_index tx_rollup level context_hash + tickets_info = manager_operation ?counter ?fee @@ -606,22 +605,23 @@ let tx_rollup_withdraw ?counter ?fee ?gas_limit ?storage_limit ctxt ?storage_limit ~source ctxt - (Tx_rollup_withdraw - { - tx_rollup; - level; - context_hash; - message_index; - withdrawals_merkle_root; - withdraw_path; - withdraw_position; - contents; - ty; - ticketer; - amount; - destination; - entrypoint; - }) + (Tx_rollup_dispatch_tickets + {tx_rollup; level; context_hash; message_index; tickets_info}) + >>=? fun to_sign_op -> + Context.Contract.manager ctxt source >|=? fun account -> + sign account.sk ctxt to_sign_op + +let transfer_ticket ?counter ?fee ?gas_limit ?storage_limit ctxt + ~(source : Contract.t) ~contents ~ty ~ticketer amount ~destination + entrypoint = + manager_operation + ?counter + ?fee + ?gas_limit + ?storage_limit + ~source + ctxt + (Transfer_ticket {contents; ty; ticketer; amount; destination; entrypoint}) >>=? fun to_sign_op -> Context.Contract.manager ctxt source >|=? fun account -> sign account.sk ctxt to_sign_op @@ -631,7 +631,7 @@ let tx_rollup_reject ?counter ?fee ?gas_limit ?storage_limit ctxt (message : Tx_rollup_message.t) ~(message_position : int) ~(message_path : Tx_rollup_inbox.Merkle.path) ~(proof : Tx_rollup_l2_proof.t) - ~(previous_message_result : Tx_rollup_commitment.message_result) = + ~(previous_message_result : Tx_rollup_message_result.t) = manager_operation ?counter ?fee diff --git a/src/proto_alpha/lib_protocol/test/helpers/op.mli b/src/proto_alpha/lib_protocol/test/helpers/op.mli index 087c0e4910c9..75a7df5d9159 100644 --- a/src/proto_alpha/lib_protocol/test/helpers/op.mli +++ b/src/proto_alpha/lib_protocol/test/helpers/op.mli @@ -285,44 +285,55 @@ val tx_rollup_remove_commitment : Tx_rollup.t -> Operation.packed tzresult Lwt.t -(** [tx_rollup_withdraw] executes a tx rollup withdrawal. +(** [tx_rollup_dispatch_tickets ctxt ~source ~message_index tx_rollup + level context_hash tickets_info] sends all tickets from + [tickets_info] to the appropriate implicit accounts, as authorized + by the [message_index]th hash of the commitment of [tx_rollup] + posted for [level]. *) +val tx_rollup_dispatch_tickets : + ?counter:counter -> + ?fee:Tez.t -> + ?gas_limit:Gas.Arith.integral -> + ?storage_limit:counter -> + Context.t -> + source:Contract.t -> + message_index:int -> + Tx_rollup.t -> + Tx_rollup_level.t -> + Context_hash.t -> + Tx_rollup_reveal.t list -> + (packed_operation, tztrace) result Lwt.t - The arguments are: +(** [transfer_ticket] allows an implicit account to transfer tickets they owned. - - [Context.t]: the context on which to apply the operation - - [source:Contract.t]: the source contract of the operation - - [Tx_rollup.t]: the rollup to which the withdrawal pertains - - [Tx_rollup_level.t]: the level on which the withdrawal was commited - - [context_hash:bytes]: the hash of the context of the rollup when the withdrawal was commited - - [message_index:int]: the inbox index of the message that that emitted this withdrawal - - [contents:Script.lazy_expr]: the contents of the ticket of the withdrawal - - [ty:Script.lazy_expr]: the type of the ticket of the withdrawal - - [ticketer:Contract.t]: the ticketer of the ticket of the withdrawal - - [Tx_rollup_l2_qty.t]: the qty of the ticket of the withdrawal - - [destination:Contract.t]: the destination contract that should received the ticket of the withdrawal - - [Tx_rollup_withdraw.merkle_tree_path]: the proof that this withdrawal was contained in the commitment - - [Entrypoint_repr.t]: the entrypoint of the destination contract to which the ticket should be sent + The arguments are: - *) -val tx_rollup_withdraw : + {ul + {li [Context.t]: the context on which to apply the operation} + {li [source:Contract.t]: the source contract of the operation} + {li [Tx_rollup.t]: the rollup to which the withdrawal pertains} + {li [Tx_rollup_level.t]: the level on which the withdrawal was commited} + {li [contents:Script.lazy_expr]: the contents of the ticket of + the withdrawal} + {li [ty:Script.lazy_expr]: the type of the ticket of the withdrawal} + {li [ticketer:Contract.t]: the ticketer of the ticket of the withdrawal} + {li [Z.t]: the quantity of the ticket of the withdrawal} + {li [destination:Contract.t]: the destination contract that + should receive the ticket of the withdrawal} + {li [Entrypoint_repr.t]: the entrypoint of the destination + contract to which the ticket should be sent}} *) +val transfer_ticket : ?counter:counter -> ?fee:Tez.t -> ?gas_limit:Gas.Arith.integral -> ?storage_limit:counter -> Context.t -> source:Contract.t -> - Tx_rollup.t -> - Tx_rollup_level.t -> - context_hash:Context_hash.t -> - message_index:int -> contents:Script.lazy_expr -> ty:Script.lazy_expr -> ticketer:Contract.t -> - Tx_rollup_l2_qty.t -> + Z.t -> destination:Contract.t -> - withdraw_position:int -> - Tx_rollup_withdraw.Merkle.root -> - Tx_rollup_withdraw.Merkle.path -> Entrypoint_repr.t -> (packed_operation, tztrace) result Lwt.t @@ -341,7 +352,7 @@ val tx_rollup_reject : message_position:int -> message_path:Tx_rollup_inbox.Merkle.path -> proof:Tx_rollup_l2_proof.t -> - previous_message_result:Tx_rollup_commitment.message_result -> + previous_message_result:Tx_rollup_message_result.t -> Operation.packed tzresult Lwt.t (** [sc_rollup_origination ctxt source kind boot_sector] originates a new 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 d86df47b7465..883ad3f87dfc 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 @@ -353,12 +353,12 @@ let make_incomplete_commitment_for_batch context level tx_rollup withdraw_list = let messages = List.mapi (fun i v -> - Tx_rollup_commitment.hash_message_result + Tx_rollup_message_result_hash.hash { context_hash = v; - withdrawals_merkle_root = + withdraw_list_hash = List.assq i withdraw_list |> Option.value ~default:[] - |> Tx_rollup_withdraw.Merkle.merklize_list; + |> Tx_rollup_withdraw_list_hash.hash; }) batches_result in @@ -440,9 +440,17 @@ module Nat_ticket = struct tx_rollup let withdrawal ctxt ~ticketer ?(claimer = ticketer) ?(amount = amount) - tx_rollup : Tx_rollup_withdraw.t tzresult Lwt.t = + tx_rollup : (Tx_rollup_withdraw.t * Tx_rollup_reveal.t) tzresult Lwt.t = ticket_hash ctxt ~ticketer ~tx_rollup >|=? fun ticket_hash -> - Tx_rollup_withdraw.{claimer = is_implicit_exn claimer; ticket_hash; amount} + ( Tx_rollup_withdraw.{claimer = is_implicit_exn claimer; ticket_hash; amount}, + Tx_rollup_reveal. + { + contents = Script.lazy_expr contents; + ty = Script.lazy_expr ty; + ticketer; + amount; + claimer = is_implicit_exn claimer; + } ) let init_deposit_contract amount block account = let script = @@ -1469,8 +1477,7 @@ let test_finalization () = inbox_burn state contents_size >>?= fun cost -> (* Add upfront cost for the commitment hash *) Context.get_constants (B b) >>=? fun {parametric = {cost_per_byte; _}; _} -> - cost_per_byte - *? Int64.of_int Tx_rollup_commitment_repr.Message_result_hash.size + cost_per_byte *? Int64.of_int Tx_rollup_prefixes.message_result_hash.hash_size >>?= fun upfront_cost -> upfront_cost +? cost >>?= fun cost -> Assert.balance_was_debited ~loc:__LOC__ (B b) contract balance cost @@ -1498,10 +1505,10 @@ let test_commitment_duplication () = [Bytes.make 20 '1'; Bytes.make 20 '2'] |> List.map (fun hash -> let context_hash = Context_hash.hash_bytes [hash] in - Tx_rollup_commitment.hash_message_result + Tx_rollup_message_result_hash.hash { context_hash; - withdrawals_merkle_root = Tx_rollup_withdraw.Merkle.empty; + withdraw_list_hash = Tx_rollup_withdraw_list_hash.empty; }) in let commitment_with_wrong_count : Tx_rollup_commitment.t = @@ -1675,7 +1682,7 @@ let test_storage_burn_for_commitment () = ~size_after:freed_space_after_remove_commitment ~expected_delta:commitment_remove_delta ; let msg_preallocation_delta = - Tx_rollup_commitment_repr.Message_result_hash.size + Tx_rollup_prefixes.message_result_hash.hash_size in let finalization_delta = 4 in Alcotest.( @@ -1769,8 +1776,7 @@ let test_storage_burn_for_commitment_and_bond () = int "The delta of adding and removing a commitment is zero (modulo \ preallocation)" - (-commitment_add_delta - - Tx_rollup_commitment_repr.Message_result_hash.size) + (-commitment_add_delta - Tx_rollup_prefixes.message_result_hash.hash_size) commitment_remove_delta) ; (* test freed storage space after return bond *) Op.tx_rollup_return_bond (B b) contract tx_rollup >>=? fun operation -> @@ -2118,10 +2124,10 @@ module Rejection = struct module Apply = Tx_rollup_l2_apply.Make (Context) module C = Tezos_context_memory.Context_binary - let previous_message_result : Tx_rollup_commitment.message_result = + let previous_message_result : Tx_rollup_message_result.t = { - context_hash = Tx_rollup_commitment.empty_l2_context_hash; - withdrawals_merkle_root = Tx_rollup_withdraw.Merkle.empty; + context_hash = Tx_rollup_message_result.empty_l2_context_hash; + withdraw_list_hash = Tx_rollup_withdraw_list_hash.empty; } let init_with_bogus_batch () = @@ -2154,12 +2160,12 @@ module Rejection = struct commitment with messages = [ - Tx_rollup_commitment.hash_message_result + Tx_rollup_message_result_hash.hash { context_hash = Context_hash.of_b58check_exn "CoUiEnajKeukmYFUgWTJF2z3v24MycpTaomF8a9hRzVy7as9hvgy"; - withdrawals_merkle_root = Tx_rollup_withdraw.Merkle.empty; + withdraw_list_hash = Tx_rollup_withdraw_list_hash.empty; }; ]; } @@ -2225,7 +2231,7 @@ module Rejection = struct let* store = init_l2_store () in let* hash_tree = hash_tree_from_store store in assert ( - Context_hash.(hash_tree = Tx_rollup_commitment.empty_l2_context_hash)) ; + Context_hash.(hash_tree = Tx_rollup_message_result.empty_l2_context_hash)) ; return_unit (** [make_proof store msg] applies [msg] on [store] and returns the @@ -2252,7 +2258,7 @@ module Rejection = struct let invalid_proof : Tx_rollup_l2_proof.t = { version = 1; - before = `Value Tx_rollup_commitment.empty_l2_context_hash; + before = `Value Tx_rollup_message_result.empty_l2_context_hash; after = `Value Context_hash.zero; state = Seq.empty; } @@ -2273,11 +2279,10 @@ module Rejection = struct in let* hash_tree = hash_tree_from_store store in let result_hash = - Tx_rollup_commitment.hash_message_result + Tx_rollup_message_result_hash.hash { context_hash = hash_tree; - withdrawals_merkle_root = - Tx_rollup_withdraw.Merkle.merklize_list withdraws; + withdraw_list_hash = Tx_rollup_withdraw_list_hash.hash withdraws; } in return (store, result_hash :: rev_results)) @@ -2478,7 +2483,7 @@ module Rejection = struct ~previous_message_result: { context_hash = l2_context_hash; - withdrawals_merkle_root = Tx_rollup_withdraw.Merkle.empty; + withdraw_list_hash = Tx_rollup_withdraw_list_hash.empty; } >>=? fun op -> Incremental.add_operation i op >>=? fun _ -> return_unit @@ -2528,7 +2533,7 @@ module Rejection = struct ~previous_message_result: { context_hash = l2_context_hash; - withdrawals_merkle_root = Tx_rollup_withdraw.Merkle.empty; + withdraw_list_hash = Tx_rollup_withdraw_list_hash.empty; } >>=? fun op -> Incremental.add_operation @@ -2587,7 +2592,7 @@ module Rejection = struct ~previous_message_result: { context_hash = l2_context_hash; - withdrawals_merkle_root = Tx_rollup_withdraw.Merkle.empty; + withdraw_list_hash = Tx_rollup_withdraw_list_hash.empty; } >>=? fun op -> Incremental.add_operation i op >>=? fun _ -> return_unit @@ -2656,11 +2661,11 @@ module Rejection = struct >>=? fun (i, contract, tx_rollup, level, message) -> let (msg, _) = Tx_rollup_message.make_batch message in (* This intentionally does not match *) - let previous_message_result : Tx_rollup_commitment.message_result = + let previous_message_result : Tx_rollup_message_result.t = { (* Expected is Tx_rollup_commitment.empty_l2_context_hash *) context_hash = Context_hash.zero; - withdrawals_merkle_root = Tx_rollup_withdraw.Merkle.empty; + withdraw_list_hash = Tx_rollup_withdraw_list_hash.empty; } in let message_hash = Tx_rollup_message.hash_uncarbonated msg in @@ -2690,10 +2695,10 @@ module Rejection = struct provided = previous_message_result; computed = Tx_rollup_message_result_hash.of_b58check_exn - "txmr221XLNBX67yfP1bzr2Aa5GdnKCDMQJFQDhMVjJmiqMeLnNSX13"; + "txmr22wWTUoPCUMd1CjAE1cgRFc63ukwCQ3gbp7dLyaBxPhEGguWHR"; expected = Tx_rollup_message_result_hash.of_b58check_exn - "txmr3BaLWnnLhhPsdH27okZpFG7urW4CyYbgsm3uiyNdFbRC8EtKTX"; + "txmr344vtdPzvWsfnoSd3mJ3MCFA5ehKLQs1pK9WGcX4FEACg1rVgC"; })) >>=? fun _ -> return_unit @@ -3228,10 +3233,7 @@ let test_state () = { commit1 with messages = - [ - Tx_rollup_commitment.hash_message_result - Rejection.previous_message_result; - ]; + [Tx_rollup_message_result_hash.hash Rejection.previous_message_result]; } in let commit2 = @@ -3302,10 +3304,7 @@ let test_state_with_deleted () = { level = Tx_rollup_level.root; messages = - [ - Tx_rollup_commitment.hash_message_result - Rejection.previous_message_result; - ]; + [Tx_rollup_message_result_hash.hash Rejection.previous_message_result]; predecessor = None; inbox_merkle_root = inbox_hash; } @@ -3388,7 +3387,7 @@ let test_state_message_storage_preallocation () = "the storage occupied by the first message is the size of the inbox plus \ the preallocation for commiting the message" (Z.of_int - (inbox_preparation + Tx_rollup_commitment_repr.Message_result_hash.size)) + (inbox_preparation + Tx_rollup_prefixes.message_result_hash.hash_size)) (Z.sub occupied_storage_after occupied_storage_before) ; let occupied_storage_before = Tx_rollup_state.Internal_for_tests.get_occupied_storage state @@ -3402,7 +3401,7 @@ let test_state_message_storage_preallocation () = ~pos:__POS__ zestable "the storage occupied by the second message is just the preallocation" - (Z.of_int Tx_rollup_commitment_repr.Message_result_hash.size) + (Z.of_int Tx_rollup_prefixes.message_result_hash.hash_size) (Z.sub occupied_storage_after occupied_storage_before) ; return_unit @@ -3469,10 +3468,24 @@ module Withdraw = struct commitment containing [withdrawals] for the last unfinalized commitments (same format as in [make_incomplete_commitment_for_batch]). - It returns the commitment and a list of dummy context hashes for the last - inboxes committed. *) - let finalize_all_commitment_with_withdrawals ~account ~tx_rollup ~withdrawals - b = + It returns the commitment and a list of dummy context hashes for + the last inboxes committed. When [batches] is set, first it + submits [batches] in a combined manager operation*) + let finalize_all_commitment_with_withdrawals ?batches ~account ~tx_rollup + ~withdrawals b = + (match batches with + | None -> return b + | Some batches -> + List.fold_right_es + (fun batch operations -> + Op.tx_rollup_submit_batch (B b) account tx_rollup batch + >>=? fun operation -> return (operation :: operations)) + batches + [] + >>=? fun operations -> + Op.combine_operations ~source:account (B b) operations + >>=? fun operation -> Block.bake ~operation b) + >>=? fun b -> Context.get_level (B b) >>?= fun current_level -> Context.Tx_rollup.state (B b) tx_rollup >>=? fun state -> wrap @@ -3522,9 +3535,13 @@ module Withdraw = struct (** [test_valid_withdraw] checks that a smart contract can deposit tickets to a transaction rollup. *) let test_valid_withdraw () = - context_init1_withdraw () - >>=? fun (account1, tx_rollup, deposit_contract, withdraw_contract, block) - -> + context_init2_withdraw () + >>=? fun ( account1, + account2, + tx_rollup, + deposit_contract, + withdraw_contract, + block ) -> Contract_helpers.originate_contract_from_string ~script: (Format.sprintf @@ -3538,7 +3555,7 @@ module Withdraw = struct block >>=? fun (withdraw_dropping_contract, _script, block) -> let token_one = Nat_ticket.ex_token ~ticketer:deposit_contract in - (* The Tx_rollup should own some tickets and the two contract none before + (* The Tx_rollup should own some tickets and the four contract none before calling withdraw.*) assert_ticket_balance ~loc:__LOC__ @@ -3554,6 +3571,10 @@ module Withdraw = struct (Contract withdraw_contract) None >>=? fun () -> + assert_ticket_balance ~loc:__LOC__ block token_one (Contract account1) None + >>=? fun () -> + assert_ticket_balance ~loc:__LOC__ block token_one (Contract account2) None + >>=? fun () -> assert_ticket_balance ~loc:__LOC__ block @@ -3591,14 +3612,14 @@ module Withdraw = struct ~claimer:account1 ~amount:half_amount tx_rollup - >>=? fun withdraw1 -> + >>=? fun (withdraw1, ticket_info1) -> Nat_ticket.withdrawal (B block) ~ticketer:deposit_contract - ~claimer:account1 + ~claimer:account2 ~amount:half_amount tx_rollup - >>=? fun withdraw2 -> + >>=? fun (withdraw2, ticket_info2) -> (* 2 Add a batch message to [b], a commitment for that inbox containing the withdrawal at index 0, and finalize that commitment *) @@ -3608,40 +3629,77 @@ module Withdraw = struct ~withdrawals:[(0, [withdraw1; withdraw2])] block >>=? fun (_commitment, context_hash_list, committed_level, block) -> - (* -- At this point, everything is in place for - the user to execute the withdrawal -- *) - - (* 3. Now execute the withdrawal. The ticket should be received by - withdraw_contract at the default entrypoint. *) - let entrypoint = Entrypoint.default in + let message_index = 0 in let context_hash = - WithExceptions.Option.get ~loc:__LOC__ @@ List.nth context_hash_list 0 - in - let withdrawals_list = [withdraw1; withdraw2] in - let withdraw_position = 0 in - wrap - @@ Tx_rollup_withdraw.Merkle.compute_path withdrawals_list withdraw_position - >>?= fun withdraw_path1 -> - let withdrawals_merkle_root = - Tx_rollup_withdraw.Merkle.merklize_list withdrawals_list + WithExceptions.Option.get + ~loc:__LOC__ + (List.nth context_hash_list message_index) in occupied_storage_size (B block) tx_rollup >>=? fun storage_size_before_withdraw -> - Op.tx_rollup_withdraw + (* -- At this point, everything is in place for the user to execute the + withdrawal -- *) + Op.tx_rollup_dispatch_tickets (B block) ~source:account1 + ~message_index tx_rollup committed_level - ~context_hash + context_hash + [ticket_info1; ticket_info2] + >>=? fun operation -> + Incremental.begin_construction block >>=? fun i -> + Incremental.add_operation i operation >>=? fun i -> + Incremental.finalize_block i >>=? fun block -> + (* Block.bake ~operation block >>=? fun block -> *) + (* Now the Tx_rollup should own no tickets and the two implicit contract half before + calling withdraw.*) + assert_ticket_balance + ~loc:__LOC__ + block + token_one + (Contract deposit_contract) + None + >>=? fun () -> + assert_ticket_balance + ~loc:__LOC__ + block + token_one + (Contract withdraw_contract) + None + >>=? fun () -> + assert_ticket_balance + ~loc:__LOC__ + block + token_one + (Contract account1) + (Some (Int64.to_int int64_half_amount)) + >>=? fun () -> + assert_ticket_balance + ~loc:__LOC__ + block + token_one + (Contract account2) + (Some (Int64.to_int int64_half_amount)) + >>=? fun () -> + assert_ticket_balance + ~loc:__LOC__ + block + token_one + (Tx_rollup tx_rollup) + None + >>=? fun () -> + (* 3. Now execute the withdrawal. The ticket should be received by + withdraw_contract at the default entrypoint. *) + let entrypoint = Entrypoint.default in + Op.transfer_ticket + (B block) + ~source:account1 ~contents:(Script.lazy_expr Nat_ticket.contents) ~ty:(Script.lazy_expr Nat_ticket.ty) ~ticketer:deposit_contract - half_amount + (Tx_rollup_l2_qty.to_z half_amount) ~destination:withdraw_contract - ~withdraw_position - withdrawals_merkle_root - withdraw_path1 - ~message_index:0 entrypoint >>=? fun operation -> Block.bake ~operation block >>=? fun block -> @@ -3652,8 +3710,8 @@ module Withdraw = struct let extra_storage_space = Z.(sub storage_size_after_withdraw storage_size_before_withdraw) in - (* extra space should be allocated for withdraw*) - assert (Z.zero < extra_storage_space) ; + (* no extra space should be allocated for withdraw*) + assert (extra_storage_space = Z.zero) ; Incremental.begin_construction block >>=? fun i -> let ctxt = Incremental.alpha_ctxt i in wrap_lwt @@ Contract.get_storage ctxt withdraw_contract @@ -3689,36 +3747,31 @@ module Withdraw = struct (Contract withdraw_contract) (Some (Int64.to_int int64_half_amount)) >>=? fun () -> + assert_ticket_balance ~loc:__LOC__ block token_one (Contract account1) None + >>=? fun () -> assert_ticket_balance ~loc:__LOC__ block token_one - (Tx_rollup tx_rollup) + (Contract account2) (Some (Int64.to_int int64_half_amount)) >>=? fun () -> + assert_ticket_balance + ~loc:__LOC__ + block + token_one + (Tx_rollup tx_rollup) + None + >>=? fun () -> (* 5.1 And finally we try to drop the other half amount of ticket. *) - let withdraw_position = 1 in - wrap - @@ Tx_rollup_withdraw.Merkle.compute_path withdrawals_list withdraw_position - >>?= fun withdraw_path2 -> - let withdrawals_merkle_root = - Tx_rollup_withdraw.Merkle.merklize_list withdrawals_list - in - Op.tx_rollup_withdraw + Op.transfer_ticket (B block) - ~source:account1 - tx_rollup - Tx_rollup_level.root - ~context_hash + ~source:account2 ~contents:(Script.lazy_expr Nat_ticket.contents) ~ty:(Script.lazy_expr Nat_ticket.ty) ~ticketer:deposit_contract - half_amount + (Tx_rollup_l2_qty.to_z half_amount) ~destination:withdraw_dropping_contract - ~withdraw_position - withdrawals_merkle_root - withdraw_path2 - ~message_index:0 entrypoint >>=? fun operation -> Block.bake ~operation block >>=? fun block -> @@ -3743,8 +3796,12 @@ module Withdraw = struct ~loc:__LOC__ block token_one - (Contract withdraw_dropping_contract) - None + (Contract withdraw_contract) + (Some (Int64.to_int int64_half_amount)) + >>=? fun () -> + assert_ticket_balance ~loc:__LOC__ block token_one (Contract account1) None + >>=? fun () -> + assert_ticket_balance ~loc:__LOC__ block token_one (Contract account2) None >>=? fun () -> assert_ticket_balance ~loc:__LOC__ @@ -3753,52 +3810,31 @@ module Withdraw = struct (Tx_rollup tx_rollup) None - (** [test_invalid_withdraw_no_commitment] checks that attempting to - withdraw from a level with no committed inbox raises an error. *) - let test_invalid_withdraw_no_commitment () = + (** [test_invalid_reveal_withdrawals_no_commitment] checks that attempting to + reveal withdrawals from a level with no committed inbox raises an + error. *) + let test_invalid_reveal_withdrawals_no_commitment () = context_init1_withdraw () - >>=? fun (account1, tx_rollup, deposit_contract, withdraw_contract, b) -> - Incremental.begin_construction b >>=? fun i -> - let entrypoint = Entrypoint.default in - let context_hash = Context_hash.hash_bytes [Bytes.make 20 'c'] in - make_ticket_key - (B b) - ~ty:(Tezos_micheline.Micheline.root Nat_ticket.ty) - ~contents:(Tezos_micheline.Micheline.root Nat_ticket.contents) + >>=? fun (account1, tx_rollup, deposit_contract, _withdraw_contract, block) + -> + Nat_ticket.withdrawal + (B block) ~ticketer:deposit_contract + ~claimer:account1 + ~amount:Nat_ticket.amount tx_rollup - >>=? fun ticket_hash -> - let dummy_withdraw : Tx_rollup_withdraw.t = - { - claimer = is_implicit_exn account1; - ticket_hash; - amount = Nat_ticket.amount; - } - in - let withdrawals_list = [dummy_withdraw] in - let withdraw_position = 0 in - wrap - @@ Tx_rollup_withdraw.Merkle.compute_path withdrawals_list withdraw_position - >>?= fun dummy_withdraw_proof -> - let withdrawals_merkle_root = - Tx_rollup_withdraw.Merkle.merklize_list withdrawals_list - in - Op.tx_rollup_withdraw - (I i) + >>=? fun (_withdraw, ticket_info) -> + Incremental.begin_construction block >>=? fun incr -> + Op.tx_rollup_dispatch_tickets + (I incr) ~source:account1 + ~message_index:0 (* any indexes will fail *) tx_rollup Tx_rollup_level.root - ~context_hash - ~message_index:0 - ~contents:(Script.lazy_expr Nat_ticket.contents) - ~ty:(Script.lazy_expr Nat_ticket.ty) - ~ticketer:deposit_contract - Nat_ticket.amount - ~destination:withdraw_contract - ~withdraw_position - withdrawals_merkle_root - dummy_withdraw_proof - entrypoint + (Context_hash.hash_bytes [Bytes.make 20 'c']) + (* any context hash will fail *) + [ticket_info] + (* any non-empty list will fail *) >>=? fun operation -> Incremental.add_operation ~expect_failure: @@ -3807,160 +3843,118 @@ module Withdraw = struct {level; window = None} -> Tx_rollup_level.(level = root) | _ -> false) - i + incr operation >>=? fun _ -> return_unit - (** [test_invalid_withdraw_missing_withdraw_in_commitment] tries - withdrawing when the commitment in question has no withdrawals - associated. *) - let test_invalid_withdraw_missing_withdraw_in_commitment () = + (** [test_invalid_reveal_withdrawals_missing_withdraw_in_commitment] tries to + reveal withdrawals when the commitment in question has no withdrawals + associated. *) + let test_invalid_reveal_withdrawals_missing_withdraw_in_commitment () = context_init1_withdraw () - >>=? fun (account1, tx_rollup, deposit_contract, withdraw_contract, b) -> + >>=? fun (account1, tx_rollup, _deposit_contract, _withdraw_contract, block) + -> let batch = "batch" in - Op.tx_rollup_submit_batch (B b) account1 tx_rollup batch + Op.tx_rollup_submit_batch (B block) account1 tx_rollup batch >>=? fun operation -> - Block.bake ~operation b >>=? fun b -> - Nat_ticket.withdrawal - (B b) - ~ticketer:deposit_contract - ~claimer:account1 - tx_rollup - >>=? fun withdraw -> + Block.bake ~operation block >>=? fun block -> finalize_all_commitment_with_withdrawals ~account:account1 ~tx_rollup - ~withdrawals:[(0, [])] - b - >>=? fun (_commitment, context_hash_list, committed_level, b) -> - Incremental.begin_construction b >>=? fun i -> - (let entrypoint = Entrypoint.default in - let context_hash = - WithExceptions.Option.get ~loc:__LOC__ @@ List.nth context_hash_list 0 - in - let withdrawals_list = [withdraw] in - let withdraw_position = 0 in - wrap - @@ Tx_rollup_withdraw.Merkle.compute_path - withdrawals_list - withdraw_position - >>?= fun withdraw_path -> - let withdrawals_merkle_root = - Tx_rollup_withdraw.Merkle.merklize_list withdrawals_list - in - Op.tx_rollup_withdraw - (I i) - ~source:account1 - tx_rollup - committed_level - ~context_hash - ~message_index:0 - ~contents:(Script.lazy_expr Nat_ticket.contents) - ~ty:(Script.lazy_expr Nat_ticket.ty) - ~ticketer:deposit_contract - Nat_ticket.amount - ~destination:withdraw_contract - ~withdraw_position - withdrawals_merkle_root - withdraw_path - entrypoint) + ~withdrawals:[] + block + >>=? fun (_commitment, context_hash_list, committed_level, block) -> + let context_hash = + WithExceptions.Option.get ~loc:__LOC__ @@ List.nth context_hash_list 0 + in + Incremental.begin_construction block >>=? fun incr -> + Op.tx_rollup_dispatch_tickets + (I incr) + ~source:account1 + ~message_index:0 + tx_rollup + committed_level + context_hash + [] >>=? fun operation -> Incremental.add_operation - ~expect_failure:(check_proto_error Tx_rollup_errors.Withdraw_invalid_path) - i + ~expect_apply_failure: + (check_proto_error Tx_rollup_errors.No_withdrawals_to_dispatch) + incr operation >>=? fun _ -> return_unit - (** [test_invalid_withdraw_tickets] test withdrawing with tickets - that do not correspond to the given proof and asserts that errors - are raised. *) - let test_invalid_withdraw_tickets () = + (** [test_reveal_withdrawals_invalid_tickets_info] test to reveal withdrawals with + tickets that do not correspond to the given proof and asserts that errors + are raised. *) + let test_reveal_withdrawals_invalid_tickets_info () = context_init1_withdraw () - >>=? fun (account1, tx_rollup, deposit_contract, withdraw_contract, b) -> + >>=? fun (account1, tx_rollup, deposit_contract, withdraw_contract, block) + -> let batch = "batch" in - Op.tx_rollup_submit_batch (B b) account1 tx_rollup batch + Op.tx_rollup_submit_batch (B block) account1 tx_rollup batch >>=? fun operation -> - Block.bake ~operation b >>=? fun b -> + Block.bake ~operation block >>=? fun block -> + let message_index = 0 in Nat_ticket.withdrawal - (B b) + (B block) ~ticketer:deposit_contract ~claimer:account1 tx_rollup - >>=? fun withdraw -> + >>=? fun (withdraw, ticket_info) -> finalize_all_commitment_with_withdrawals ~account:account1 ~tx_rollup ~withdrawals:[(0, [withdraw])] - b - >>=? fun (_commitment, context_hash_list, committed_level, b) -> - (* Try executing the withdrawal with invalid amounts *) - let entrypoint = Entrypoint.default in + block + >>=? fun (_commitment, context_hash_list, committed_level, block) -> let context_hash = - WithExceptions.Option.get ~loc:__LOC__ @@ List.nth context_hash_list 0 + WithExceptions.Option.get + ~loc:__LOC__ + (List.nth context_hash_list message_index) in - Incremental.begin_construction b >>=? fun i -> - List.iter_es - (fun amount -> - (let withdrawals_list = [{withdraw with amount}] in - let withdraw_position = 0 in - wrap - @@ Tx_rollup_withdraw.Merkle.compute_path - withdrawals_list - withdraw_position - >>?= fun withdraw_path -> - let withdrawals_merkle_root = - Tx_rollup_withdraw.Merkle.merklize_list withdrawals_list - in - Op.tx_rollup_withdraw - (I i) - ~source:account1 - tx_rollup - committed_level - ~context_hash - ~message_index:0 - ~contents:(Script.lazy_expr Nat_ticket.contents) - ~ty:(Script.lazy_expr Nat_ticket.ty) - ~ticketer:deposit_contract - amount - ~destination:withdraw_contract - ~withdraw_position - withdrawals_merkle_root - withdraw_path - entrypoint) - >>=? fun operation -> - Incremental.add_operation - ~expect_failure: - (check_proto_error Tx_rollup_errors.Withdraw_invalid_path) - i - operation - >>=? fun _i -> return_unit) - [Tx_rollup_l2_qty.of_int64_exn 9L; Tx_rollup_l2_qty.of_int64_exn 11L] - >>=? fun () -> + Incremental.begin_construction block >>=? fun incr -> + (* Try with invalid amounts *) + Op.tx_rollup_dispatch_tickets + (I incr) + ~source:account1 + ~message_index + tx_rollup + committed_level + context_hash + [{ticket_info with amount = Tx_rollup_l2_qty.of_int64_exn 9L}] + >>=? fun operation -> + Incremental.add_operation + ~expect_failure: + (check_proto_error Tx_rollup_errors.Withdrawals_invalid_path) + incr + operation + >>=? fun _incr -> + (* Try with twice the same withdrawal *) + Op.tx_rollup_dispatch_tickets + (I incr) + ~source:account1 + ~message_index + tx_rollup + committed_level + context_hash + [ticket_info; ticket_info] + >>=? fun operation -> + Incremental.add_operation + ~expect_failure: + (check_proto_error Tx_rollup_errors.Withdrawals_invalid_path) + incr + operation + >>=? fun _incr -> (* Try with wrong type *) - let withdrawals_list = [withdraw] in - let withdraw_position = 0 in - ( wrap - @@ Tx_rollup_withdraw.Merkle.compute_path withdrawals_list withdraw_position - >>?= fun withdraw_path -> - let withdrawals_merkle_root = - Tx_rollup_withdraw.Merkle.merklize_list withdrawals_list - in - Op.tx_rollup_withdraw - (I i) - ~source:account1 - tx_rollup - committed_level - ~context_hash - ~message_index:0 - ~contents:(Script.lazy_expr Nat_ticket.contents) - ~ty:(Script.lazy_expr @@ Expr.from_string "unit") - ~ticketer:deposit_contract - Nat_ticket.amount - ~destination:withdraw_contract - withdrawals_merkle_root - withdraw_path - ~withdraw_position - entrypoint ) + Op.tx_rollup_dispatch_tickets + (I incr) + ~source:account1 + ~message_index + tx_rollup + committed_level + context_hash + [{ticket_info with ty = Script.lazy_expr @@ Expr.from_string "unit"}] >>=? fun operation -> Incremental.add_operation ~expect_failure:(function @@ -3969,781 +3963,372 @@ module Withdraw = struct :: _ -> return_unit | _ -> Alcotest.fail "expected to fail with wrong type") - i + incr operation - >>=? fun _i -> + >>=? fun _incr -> (* Try with wrong contents *) - (let withdrawals_list = [withdraw] in - let withdraw_position = 0 in - wrap - @@ Tx_rollup_withdraw.Merkle.compute_path - withdrawals_list - withdraw_position - >>?= fun withdraw_path -> - let withdrawals_merkle_root = - Tx_rollup_withdraw.Merkle.merklize_list withdrawals_list - in - Op.tx_rollup_withdraw - (I i) - ~source:account1 - tx_rollup - Tx_rollup_level.root - ~context_hash - ~message_index:0 - ~contents:(Script.lazy_expr @@ Expr.from_string "2") - ~ty:(Script.lazy_expr Nat_ticket.ty) - ~ticketer:deposit_contract - Nat_ticket.amount - ~destination:withdraw_contract - withdrawals_merkle_root - withdraw_path - ~withdraw_position - entrypoint) + Op.tx_rollup_dispatch_tickets + (I incr) + ~source:account1 + ~message_index + tx_rollup + committed_level + context_hash + [{ticket_info with contents = Script.lazy_expr @@ Expr.from_string "2"}] >>=? fun operation -> Incremental.add_operation - ~expect_failure:(check_proto_error Tx_rollup_errors.Withdraw_invalid_path) - i + ~expect_failure: + (check_proto_error Tx_rollup_errors.Withdrawals_invalid_path) + incr operation - >>=? fun _i -> + >>=? fun _incr -> (* Try with wrong ticketer *) - (let withdrawals_list = [withdraw] in - let withdraw_position = 0 in - wrap - @@ Tx_rollup_withdraw.Merkle.compute_path - withdrawals_list - withdraw_position - >>?= fun withdraw_path -> - let withdrawals_merkle_root = - Tx_rollup_withdraw.Merkle.merklize_list withdrawals_list - in - Op.tx_rollup_withdraw - (I i) - ~source:account1 - tx_rollup - Tx_rollup_level.root - ~context_hash - ~message_index:0 - ~contents:(Script.lazy_expr Nat_ticket.contents) - ~ty:(Script.lazy_expr Nat_ticket.ty) - ~ticketer:account1 - Nat_ticket.amount - ~destination:withdraw_contract - withdrawals_merkle_root - withdraw_path - ~withdraw_position - entrypoint) + Op.tx_rollup_dispatch_tickets + (I incr) + ~source:account1 + ~message_index + tx_rollup + committed_level + context_hash + [{ticket_info with ticketer = withdraw_contract}] >>=? fun operation -> Incremental.add_operation - ~expect_failure:(check_proto_error Tx_rollup_errors.Withdraw_invalid_path) - i + ~expect_failure: + (check_proto_error Tx_rollup_errors.Withdrawals_invalid_path) + incr operation - >>=? fun _i -> return_unit + >>=? fun _incr -> return_unit - (** [test_invalid_withdraw_invalid_proof] tries withdrawing with - an invalid proof. *) - let test_invalid_withdraw_invalid_proof () = + (** [test_reveal_withdrawals_twice] asserts that withdrawing the same + withdrawal twice raises an error with the ticket table accounting. *) + let test_reveal_withdrawals_twice () = context_init1_withdraw () - >>=? fun (account1, tx_rollup, deposit_contract, withdraw_contract, b) -> - let batch = "batch" in - Op.tx_rollup_submit_batch (B b) account1 tx_rollup batch - >>=? fun operation -> - Block.bake ~operation b >>=? fun b -> + >>=? fun (account1, tx_rollup, deposit_contract, _withdraw_contract, block) + -> Nat_ticket.withdrawal - (B b) + (B block) + ~amount: + (Tx_rollup_l2_qty.of_int64_exn + (Int64.div (Tx_rollup_l2_qty.to_int64 Nat_ticket.amount) 2L)) ~ticketer:deposit_contract ~claimer:account1 tx_rollup - >>=? fun withdrawal1 -> - let withdrawal2 : Tx_rollup_withdraw.t = - {withdrawal1 with amount = Tx_rollup_l2_qty.of_int64_exn 5L} - in + >>=? fun (withdraw, ticket_info) -> finalize_all_commitment_with_withdrawals ~account:account1 ~tx_rollup - ~withdrawals:[(0, [withdrawal1; withdrawal2])] - b - >>=? fun (_commitment, context_hash_list, committed_level, b) -> - let entrypoint = Entrypoint.default in + ~withdrawals:[(0, [withdraw])] + block + >>=? fun (_commitment, context_hash_list, committed_level, block) -> + let message_index = 0 in let context_hash = - WithExceptions.Option.get ~loc:__LOC__ @@ List.nth context_hash_list 0 - in - - Incremental.begin_construction b >>=? fun i -> - let withdrawals_list = [withdrawal1; withdrawal2] in - let withdraw_position = 1 in - wrap - @@ Tx_rollup_withdraw.Merkle.compute_path withdrawals_list withdraw_position - (* We're sending the parameters for withdrawal1, but we calculate - the proof for withdrawal2 *) - >>?= - fun invalid_withdraw_path -> - let withdrawals_merkle_root = - Tx_rollup_withdraw.Merkle.merklize_list withdrawals_list + WithExceptions.Option.get + ~loc:__LOC__ + (List.nth context_hash_list message_index) in - Op.tx_rollup_withdraw - (I i) + Op.tx_rollup_dispatch_tickets + (B block) ~source:account1 + ~message_index tx_rollup committed_level - ~context_hash - ~message_index:0 - ~contents:(Script.lazy_expr Nat_ticket.contents) - ~ty:(Script.lazy_expr Nat_ticket.ty) - ~ticketer:deposit_contract - Nat_ticket.amount - ~destination:withdraw_contract - withdrawals_merkle_root - invalid_withdraw_path - ~withdraw_position - entrypoint + context_hash + [ticket_info] >>=? fun operation -> - Incremental.add_operation - ~expect_failure:(check_proto_error Tx_rollup_errors.Withdraw_invalid_path) - i - operation - >>=? fun _ -> - let withdrawals_list = [withdrawal1] in - let withdraw_position = 0 in - ( (* We give the proof for a list of withdrawals that does not correspond - to the list in the commitment *) - wrap - @@ Tx_rollup_withdraw.Merkle.compute_path withdrawals_list withdraw_position - >>?= fun invalid_withdraw_path -> - let withdrawals_merkle_root = - Tx_rollup_withdraw.Merkle.merklize_list withdrawals_list - in - Op.tx_rollup_withdraw - (I i) - ~source:account1 - tx_rollup - Tx_rollup_level.root - ~context_hash - ~message_index:0 - ~contents:(Script.lazy_expr Nat_ticket.contents) - ~ty:(Script.lazy_expr Nat_ticket.ty) - ~ticketer:deposit_contract - Nat_ticket.amount - ~destination:withdraw_contract - withdrawals_merkle_root - invalid_withdraw_path - ~withdraw_position - entrypoint ) + Block.bake ~operation block >>=? fun block -> + (* Execute again *) + Op.tx_rollup_dispatch_tickets + (B block) + ~source:account1 + ~message_index + tx_rollup + committed_level + context_hash + [ticket_info] >>=? fun operation -> + Incremental.begin_construction block >>=? fun incr -> Incremental.add_operation - ~expect_failure:(check_proto_error Tx_rollup_errors.Withdraw_invalid_path) - i + ~expect_failure: + (check_proto_error Tx_rollup_errors.Withdrawals_already_dispatched) + incr operation >>=? fun _ -> return_unit - (** [test_invalid_withdraw_already_consumed] asserts that withdrawing the same - withdrawal twice raises [Withdraw_already_consumed]. *) - let test_invalid_withdraw_already_consumed () = - context_init1_withdraw () - >>=? fun (account1, tx_rollup, deposit_contract, withdraw_contract, b) -> + (** [test_multiple_withdrawals_multiple_batches] checks that multiple withdrawals + from the same batch are possible. *) + let test_multiple_withdrawals_multiple_batches () = + context_init2_withdraw () + >>=? fun ( account1, + account2, + tx_rollup, + deposit_contract, + withdraw_contract, + block ) -> Nat_ticket.withdrawal - (B b) + (B block) + ~ticketer:deposit_contract + ~claimer:account1 + ~amount:(Tx_rollup_l2_qty.of_int64_exn 1L) + tx_rollup + >>=? fun (withdraw1, ticket_info1) -> + Nat_ticket.withdrawal + (B block) + ~ticketer:deposit_contract + ~claimer:account1 + ~amount:(Tx_rollup_l2_qty.of_int64_exn 1L) + tx_rollup + >>=? fun (withdraw2, ticket_info2) -> + Nat_ticket.withdrawal + (B block) ~ticketer:deposit_contract ~claimer:account1 + ~amount:(Tx_rollup_l2_qty.of_int64_exn 2L) + tx_rollup + >>=? fun (withdraw3, ticket_info3) -> + Nat_ticket.withdrawal + (B block) + ~ticketer:deposit_contract + ~claimer:account2 + ~amount:(Tx_rollup_l2_qty.of_int64_exn 2L) tx_rollup - >>=? fun withdraw -> + >>=? fun (withdraw4, ticket_info4) -> + let first_message_index = 0 in + let second_message_index = 1 in + let first_withdrawals = [withdraw1; withdraw2] in + let second_withdrawals = [withdraw3; withdraw4] in finalize_all_commitment_with_withdrawals + ~batches:["batch1"; "batch2"] ~account:account1 ~tx_rollup - ~withdrawals:[(0, [withdraw])] - b - >>=? fun (_commitment, context_hash_list, committed_level, b) -> - let entrypoint = Entrypoint.default in - let context_hash = - WithExceptions.Option.get ~loc:__LOC__ @@ List.nth context_hash_list 0 + ~withdrawals: + [ + (first_message_index, first_withdrawals); + (second_message_index, second_withdrawals); + ] + block + >>=? fun (_commitment, context_hash_list, committed_level, block) -> + let first_context_hash = + WithExceptions.Option.get + ~loc:__LOC__ + (List.nth context_hash_list first_message_index) in - let withdrawals_list = [withdraw] in - let withdraw_position = 0 in - wrap - @@ Tx_rollup_withdraw.Merkle.compute_path withdrawals_list withdraw_position - >>?= fun withdraw_path -> - (* Execute withdraw *) - let withdrawals_merkle_root = - Tx_rollup_withdraw.Merkle.merklize_list withdrawals_list + let second_context_hash = + WithExceptions.Option.get + ~loc:__LOC__ + (List.nth context_hash_list second_message_index) in - Op.tx_rollup_withdraw - (B b) - ~source:account1 - tx_rollup - committed_level - ~context_hash - ~contents:(Script.lazy_expr Nat_ticket.contents) - ~ty:(Script.lazy_expr Nat_ticket.ty) - ~ticketer:deposit_contract - Nat_ticket.amount - ~destination:withdraw_contract - withdrawals_merkle_root - withdraw_path - ~message_index:0 - ~withdraw_position - entrypoint - >>=? fun operation -> - Block.bake ~operation b >>=? fun b -> - (* Execute again *) - Incremental.begin_construction b >>=? fun i -> - Op.tx_rollup_withdraw - (I i) + Op.tx_rollup_dispatch_tickets + (B block) ~source:account1 + ~message_index:first_message_index tx_rollup committed_level - ~context_hash - ~contents:(Script.lazy_expr Nat_ticket.contents) - ~ty:(Script.lazy_expr Nat_ticket.ty) - ~ticketer:deposit_contract - Nat_ticket.amount - ~destination:withdraw_contract - withdrawals_merkle_root - withdraw_path - ~withdraw_position - ~message_index:0 - entrypoint + first_context_hash + [ticket_info1; ticket_info2] >>=? fun operation -> - Incremental.add_operation - ~expect_failure: - (check_proto_error Tx_rollup_errors.Withdraw_already_consumed) - i - operation - >>=? fun _ -> return_unit - - (** [test_multiple_withdrawals_same_batch] checks that multiple - withdrawals from the same batch are possible. *) - let test_multiple_withdrawals_same_batch () = - context_init1_withdraw () - >>=? fun (account1, tx_rollup, deposit_contract, withdraw_contract, b) -> - Nat_ticket.withdrawal - (B b) - ~ticketer:deposit_contract - ~claimer:account1 - ~amount:(Tx_rollup_l2_qty.of_int64_exn 1L) - tx_rollup - >>=? fun withdraw1 -> - Nat_ticket.withdrawal - (B b) - ~ticketer:deposit_contract - ~claimer:account1 - ~amount:(Tx_rollup_l2_qty.of_int64_exn 2L) - tx_rollup - >>=? fun withdraw2 -> - let withdraws = [withdraw1; withdraw2] in - finalize_all_commitment_with_withdrawals - ~account:account1 - ~tx_rollup - ~withdrawals:[(0, withdraws)] - b - >>=? fun (_commitment, context_hash_list, committed_level, b) -> - let entrypoint = Entrypoint.default in - let context_hash = - WithExceptions.Option.get ~loc:__LOC__ @@ List.nth context_hash_list 0 - in - let withdraw_root = Tx_rollup_withdraw.Merkle.merklize_list withdraws in + Block.bake ~operation block >>=? fun block -> (* Execute withdraw *) - let withdraw_op b withdraw_proof qty withdraw_position = - Op.tx_rollup_withdraw + let withdraw_op source b qty = + Op.transfer_ticket (B b) - ~source:account1 - tx_rollup - committed_level - ~context_hash + ~source ~contents:(Script.lazy_expr Nat_ticket.contents) ~ty:(Script.lazy_expr Nat_ticket.ty) ~ticketer:deposit_contract qty ~destination:withdraw_contract - ~message_index:0 - ~withdraw_position - withdraw_root - withdraw_proof - entrypoint + Entrypoint.default in - let withdraw_proof = - match Tx_rollup_withdraw.Merkle.compute_path withdraws 0 with - | Ok x -> x - | Error _ -> assert false - in - withdraw_op b withdraw_proof (Tx_rollup_l2_qty.of_int64_exn 1L) 0 - >>=? fun operation -> - Block.bake ~operation b >>=? fun b -> - (* Execute again *) - Incremental.begin_construction b >>=? fun i -> - withdraw_op b withdraw_proof (Tx_rollup_l2_qty.of_int64_exn 1L) 0 - >>=? fun operation -> + (* Execute withdraw with half amount *) + withdraw_op account1 block Z.one >>=? fun operation -> + Block.bake ~operation block >>=? fun block -> + (* Execute withdraw with the rest amount *) + withdraw_op account1 block Z.one >>=? fun operation -> + Block.bake ~operation block >>=? fun block -> + (* Execute again, now should fail with a ticket table error *) + withdraw_op account1 block Z.one >>=? fun operation -> + Incremental.begin_construction block >>=? fun incr -> Incremental.add_operation - ~expect_failure: - (check_proto_error Tx_rollup_errors.Withdraw_already_consumed) - i + ~expect_failure:(function + | Environment.Ecoproto_error + (Ticket_balance.Negative_ticket_balance {key = _; balance}) + :: _ -> + if Z.(balance = neg @@ of_int64 1L) then return_unit + (* key is ticket hash with account1 as owner *) + else Alcotest.fail "failed with wrong value" + | _ -> + Alcotest.fail "expected to fail with ticket table accounting error") + incr operation - >>=? fun _ -> - let withdraw_proof = - match Tx_rollup_withdraw.Merkle.compute_path withdraws 1 with - | Ok x -> x - | Error _ -> assert false - in - (* Execute second withdraw *) - withdraw_op b withdraw_proof (Tx_rollup_l2_qty.of_int64_exn 2L) 1 - >>=? fun operation -> - Incremental.add_operation i operation >>=? fun _i -> return_unit - - (** [test_multiple_withdrawals_same_inbox] checks that multiple - withdrawals from the same inbox are possible. *) - let test_multiple_withdrawals_same_inbox () = - context_init1_withdraw () - >>=? fun (account1, tx_rollup, deposit_contract, withdraw_contract, b) -> - Nat_ticket.withdrawal - (B b) - ~ticketer:deposit_contract - ~claimer:account1 - ~amount:(Tx_rollup_l2_qty.of_int64_exn 1L) - tx_rollup - >>=? fun withdraw1 -> - Nat_ticket.withdrawal - (B b) - ~ticketer:deposit_contract - ~claimer:account1 - ~amount:(Tx_rollup_l2_qty.of_int64_exn 2L) - tx_rollup - >>=? fun withdraw2 -> - Incremental.begin_construction b >>=? fun i -> - (* 2. Create a commitment *) - make_incomplete_commitment_for_batch (I i) Tx_rollup_level.root tx_rollup [] - >>=? fun (commitment, _) -> - Op.tx_rollup_commit (I i) account1 tx_rollup commitment - >>=? fun operation -> - Incremental.add_operation i operation >>=? fun i -> - (* 1. Submit two batches *) - Op.tx_rollup_submit_batch (I i) account1 tx_rollup "batch" - >>=? fun operation -> - Incremental.add_operation i operation >>=? fun i -> - Op.tx_rollup_submit_batch (I i) account1 tx_rollup "batch2" - >>=? fun operation -> - Incremental.add_operation i operation >>=? fun i -> - Incremental.finalize_block i >>=? fun b -> - Incremental.begin_construction b >>=? fun i -> - (* 2. Create a commitment *) - make_incomplete_commitment_for_batch - (I i) - (tx_level 1l) + >>=? fun _incr -> + (* Execute second reveal *) + Op.tx_rollup_dispatch_tickets + (B block) + ~source:account1 + ~message_index:second_message_index tx_rollup - [(0, [withdraw1]); (1, [withdraw2])] - >>=? fun (commitment, context_hash_list) -> - Op.tx_rollup_commit (I i) account1 tx_rollup commitment - >>=? fun operation -> - Incremental.add_operation i operation >>=? fun i -> - Incremental.finalize_block i >>=? fun b -> - (* 3. Finalize the commitments *) - Op.tx_rollup_finalize (B b) account1 tx_rollup >>=? fun operation -> - Block.bake ~operation b >>=? fun b -> - Op.tx_rollup_finalize (B b) account1 tx_rollup >>=? fun operation -> - Block.bake ~operation b >>=? fun b -> - let entrypoint = Entrypoint.default in - (* Execute withdraw *) - let withdraw_op b withdraw_root withdraw_proof qty message_index = - let context_hash = - WithExceptions.Option.get ~loc:__LOC__ - @@ List.nth context_hash_list message_index - in - Op.tx_rollup_withdraw - (B b) - ~source:account1 - tx_rollup - (tx_level 1l) - ~context_hash - ~contents:(Script.lazy_expr Nat_ticket.contents) - ~ty:(Script.lazy_expr Nat_ticket.ty) - ~ticketer:deposit_contract - qty - ~destination:withdraw_contract - ~withdraw_position:0 - ~message_index - withdraw_root - withdraw_proof - entrypoint - in - let withdraw_root = Tx_rollup_withdraw.Merkle.merklize_list [withdraw1] in - let withdraw_proof = - match Tx_rollup_withdraw.Merkle.compute_path [withdraw1] 0 with - | Ok x -> x - | _ -> assert false - in - withdraw_op - b - withdraw_root - withdraw_proof - (Tx_rollup_l2_qty.of_int64_exn 1L) - 0 - >>=? fun operation -> - Block.bake ~operation b >>=? fun b -> - (* Execute again *) - Incremental.begin_construction b >>=? fun i -> - withdraw_op - b - withdraw_root - withdraw_proof - (Tx_rollup_l2_qty.of_int64_exn 1L) - 0 - >>=? fun operation -> - Incremental.add_operation - ~expect_failure: - (check_proto_error Tx_rollup_errors.Withdraw_already_consumed) - i - operation - >>=? fun _ -> - (* Execute second withdraw *) - let withdraw_root = Tx_rollup_withdraw.Merkle.merklize_list [withdraw2] in - let withdraw_proof = - match Tx_rollup_withdraw.Merkle.compute_path [withdraw2] 0 with - | Ok x -> x - | _ -> assert false - in - withdraw_op - b - withdraw_root - withdraw_proof - (Tx_rollup_l2_qty.of_int64_exn 2L) - 1 + committed_level + second_context_hash + [ticket_info3; ticket_info4] >>=? fun operation -> - Incremental.add_operation i operation >>=? fun _i -> return_unit + Block.bake ~operation block >>=? fun block -> + withdraw_op account1 block (Z.of_int 2) >>=? fun operation1 -> + withdraw_op account2 block (Z.of_int 2) >>=? fun operation2 -> + Block.bake ~operations:[operation1; operation2] block >>=? fun _block -> + return_unit - (** [test_invalid_withdraw_someone_elses] asserts that attempting to - execute a withdrawal with an erroneous [recipient] creates an - incorrect proof. *) - let test_invalid_withdraw_someone_elses () = + (** [test_invalid_index_or_context] checks that attempting to reveal withdrawal + from a level with a wrong message index or context hash raises an + error. *) + let test_invalid_index_or_context () = context_init2_withdraw () >>=? fun ( account1, account2, tx_rollup, deposit_contract, - withdraw_contract, - b ) -> + _withdraw_contract, + block ) -> + let batch = "batch" in + Op.tx_rollup_submit_batch (B block) account1 tx_rollup batch + >>=? fun operation1 -> + Op.tx_rollup_submit_batch (B block) account2 tx_rollup batch + >>=? fun operation2 -> + Block.bake ~operations:[operation1; operation2] block >>=? fun block -> Nat_ticket.withdrawal - (B b) + (B block) ~ticketer:deposit_contract ~claimer:account1 tx_rollup - >>=? fun withdraw -> - finalize_all_commitment_with_withdrawals - ~account:account1 - ~tx_rollup - ~withdrawals:[(0, [withdraw])] - b - >>=? fun (_commitment, context_hash_list, committed_level, b) -> - let entrypoint = Entrypoint.default in - let context_hash = - WithExceptions.Option.get ~loc:__LOC__ @@ List.nth context_hash_list 0 - in - let withdrawals_list = [withdraw] in - let withdraw_position = 0 in - wrap - @@ Tx_rollup_withdraw.Merkle.compute_path withdrawals_list withdraw_position - >>?= fun withdraw_path -> - (* Execute again *) - Incremental.begin_construction b >>=? fun i -> - let withdrawals_merkle_root = - Tx_rollup_withdraw.Merkle.merklize_list withdrawals_list - in - Op.tx_rollup_withdraw - (I i) - (* The source of the withdrawal execution is not the recipient set in [withdraw] *) - ~source:account2 + >>=? fun (withdraw, ticket_info) -> + make_incomplete_commitment_for_batch + (B block) + Tx_rollup_level.root tx_rollup - committed_level - ~context_hash - ~contents:(Script.lazy_expr Nat_ticket.contents) - ~ty:(Script.lazy_expr Nat_ticket.ty) - ~ticketer:deposit_contract - Nat_ticket.amount - ~destination:withdraw_contract - withdrawals_merkle_root - withdraw_path - ~withdraw_position - ~message_index:0 - entrypoint + [] + >>=? fun (commitment, _context_hash_list) -> + Op.tx_rollup_commit (B block) account1 tx_rollup commitment >>=? fun operation -> - Incremental.add_operation - ~expect_failure:(check_proto_error Tx_rollup_errors.Withdraw_invalid_path) - i - operation - >>=? fun _ -> return_unit - - (** [test_invalid_withdraw_illtyped_entrypoint] asserts that - attempting to withdraw nat tickets to a contract taking unit - tickets raises [Bad_contract_parameter]. *) - let test_invalid_withdraw_illtyped_entrypoint () = - context_init1_withdraw () - >>=? fun ( account1, - tx_rollup, - deposit_contract, - _unused_withdraw_contract, - b ) -> - Contract_helpers.originate_contract - "contracts/tx_rollup_withdraw_unit_tickets.tz" - "None" - account1 - b - (is_implicit_exn account1) - >>=? fun (withdraw_contract_unit_tickets, b) -> - Nat_ticket.withdrawal - (B b) - ~ticketer:deposit_contract - ~claimer:account1 + Block.bake ~operation block >>=? fun block -> + Op.tx_rollup_finalize (B block) account1 tx_rollup >>=? fun operation -> + Block.bake ~operation block >>=? fun block -> + let valid_message_index = 0 in + let wrong_message_index = 1 in + make_incomplete_commitment_for_batch + (B block) + Tx_rollup_level.(succ root) tx_rollup - >>=? fun withdraw -> - finalize_all_commitment_with_withdrawals - ~account:account1 - ~tx_rollup - ~withdrawals:[(0, [withdraw])] - b - >>=? fun (_commitment, context_hash_list, committed_level, b) -> - let entrypoint = Entrypoint.default in - let context_hash = - WithExceptions.Option.get ~loc:__LOC__ @@ List.nth context_hash_list 0 + [(valid_message_index, [withdraw])] + >>=? fun (commitment, context_hash_list) -> + Op.tx_rollup_commit (B block) account1 tx_rollup commitment + >>=? fun operation -> + Block.bake ~operation block >>=? fun block -> + (* 3. Finalize the commitment *) + Op.tx_rollup_finalize (B block) account1 tx_rollup >>=? fun operation -> + Block.bake ~operation block >>=? fun block -> + let valid_context_hash = + WithExceptions.Option.get + ~loc:__LOC__ + (List.nth context_hash_list valid_message_index) in - let withdrawals_list = [withdraw] in - let withdraw_position = 0 in - wrap - @@ Tx_rollup_withdraw.Merkle.compute_path withdrawals_list withdraw_position - >>?= fun withdraw_path -> - Incremental.begin_construction b >>=? fun i -> - let withdrawals_merkle_root = - Tx_rollup_withdraw.Merkle.merklize_list withdrawals_list + let wrong_context_hash = + WithExceptions.Option.get + ~loc:__LOC__ + (List.nth context_hash_list wrong_message_index) in - Op.tx_rollup_withdraw - (I i) + Incremental.begin_construction block >>=? fun incr -> + (* try with wrong context hash *) + Op.tx_rollup_dispatch_tickets + (I incr) ~source:account1 + ~message_index:valid_message_index tx_rollup - committed_level - ~context_hash - ~contents:(Script.lazy_expr Nat_ticket.contents) - ~ty:(Script.lazy_expr Nat_ticket.ty) - ~ticketer:deposit_contract - Nat_ticket.amount - ~destination:withdraw_contract_unit_tickets - withdrawals_merkle_root - withdraw_path - ~message_index:0 - ~withdraw_position - entrypoint + Tx_rollup_level.(succ root) + wrong_context_hash + [ticket_info] >>=? fun operation -> Incremental.add_operation ~expect_failure: - (check_proto_error - @@ Script_interpreter.Bad_contract_parameter - withdraw_contract_unit_tickets) - i + (check_proto_error Tx_rollup_errors.Withdrawals_invalid_path) + incr operation - >>=? fun _ -> return_unit - - (** [test_invalid_withdraw_bad_entrypoint] asserts that - attempting to withdraw nat tickets to a contract taking unit - tickets raises [Bad_contract_parameter]. *) - let test_invalid_withdraw_bad_entrypoint () = - context_init1_withdraw () - >>=? fun (account1, tx_rollup, deposit_contract, withdraw_contract, b) -> - Nat_ticket.withdrawal - (B b) - ~ticketer:deposit_contract - ~claimer:account1 - tx_rollup - >>=? fun withdraw -> - finalize_all_commitment_with_withdrawals - ~account:account1 - ~tx_rollup - ~withdrawals:[(0, [withdraw])] - b - >>=? fun (_commitment, context_hash_list, committed_level, b) -> - let inexistant_entrypoint = Entrypoint.of_string_strict_exn "foobar" in - let context_hash = - WithExceptions.Option.get ~loc:__LOC__ @@ List.nth context_hash_list 0 - in - let withdrawals_list = [withdraw] in - let withdraw_position = 0 in - wrap - @@ Tx_rollup_withdraw.Merkle.compute_path withdrawals_list withdraw_position - >>?= fun withdraw_path -> - let withdrawals_merkle_root = - Tx_rollup_withdraw.Merkle.merklize_list withdrawals_list - in - Incremental.begin_construction b >>=? fun i -> - Op.tx_rollup_withdraw - (I i) + >>=? fun _i -> + (* try with wrong message_index *) + Op.tx_rollup_dispatch_tickets + (I incr) ~source:account1 + ~message_index:wrong_message_index tx_rollup - committed_level - ~context_hash - ~contents:(Script.lazy_expr Nat_ticket.contents) - ~ty:(Script.lazy_expr Nat_ticket.ty) - ~ticketer:deposit_contract - Nat_ticket.amount - ~destination:withdraw_contract - withdrawals_merkle_root - withdraw_path - ~message_index:0 - ~withdraw_position - inexistant_entrypoint + Tx_rollup_level.(succ root) + valid_context_hash + [ticket_info] >>=? fun operation -> Incremental.add_operation ~expect_failure: - (check_proto_error - @@ Script_interpreter.Bad_contract_parameter withdraw_contract) - i + (check_proto_error Tx_rollup_errors.Withdrawals_invalid_path) + incr operation - >>=? fun _ -> return_unit - - (** [test_invalid_message_index] checks that attempting to withdraw from a - level with a wrong message index raises an error. *) - let test_invalid_message_index () = - context_init1_withdraw () - >>=? fun (account1, tx_rollup, deposit_contract, withdraw_contract, b) -> - (* 1. Create and submit two dummy batch *) - let batch1 = "batch" in - Op.tx_rollup_submit_batch (B b) account1 tx_rollup batch1 - >>=? fun operation -> - Block.bake ~operation b >>=? fun b -> - (* 2.1 Create a ticket and its hash *) - let ty = Expr.from_string "nat" in - let contents_nat = 1 in - let contents = Expr.from_string (string_of_int contents_nat) in - let amount = Tx_rollup_l2_qty.of_int64_exn 10L in - make_ticket_key - (B b) - ~ty:(Tezos_micheline.Micheline.root ty) - ~contents:(Tezos_micheline.Micheline.root contents) - ~ticketer:deposit_contract - tx_rollup - >>=? fun ticket_hash -> - (* 2.2 Create a withdrawal for the ticket *) - let withdraw : Tx_rollup_withdraw.t = - {claimer = is_implicit_exn account1; ticket_hash; amount} - in - - (* 2.3 Finally, make a commitment for the dummy batch. mock the - list of withdrawals to include the previously created - [withdrawal]. Include the commitment in an operation and bake - it. *) - Incremental.begin_construction b >>=? fun i -> - make_incomplete_commitment_for_batch - (I i) - Tx_rollup_level.root + >>=? fun _i -> + (* valid reveal *) + Op.tx_rollup_dispatch_tickets + (I incr) + ~source:account1 + ~message_index:valid_message_index tx_rollup - [(0, [withdraw])] - >>=? fun (commitment, context_hash_list) -> - Op.tx_rollup_commit (I i) account1 tx_rollup commitment + Tx_rollup_level.(succ root) + valid_context_hash + [ticket_info] >>=? fun operation -> - Incremental.add_operation i operation >>=? fun i -> - Incremental.finalize_block i >>=? fun b -> - (* 3. Finalize the commitment *) - Op.tx_rollup_finalize (B b) account1 tx_rollup >>=? fun operation -> - Block.bake ~operation b >>=? fun b -> - (* -- At this point, everything is in place for - the user to execute the withdrawal -- *) - - (* 4. Now execute the withdrawal. The ticket should be received - by withdraw_contract at the default entrypoint. *) - (let entrypoint = Entrypoint.default in - let context_hash = - WithExceptions.Option.get ~loc:__LOC__ @@ List.nth context_hash_list 0 - in - let withdrawals_list = [withdraw] in - let withdraw_position = 0 in - wrap - @@ Tx_rollup_withdraw.Merkle.compute_path - withdrawals_list - withdraw_position - >>?= fun withdraw_path -> - let withdrawals_merkle_root = - Tx_rollup_withdraw.Merkle.merklize_list withdrawals_list - in - Op.tx_rollup_withdraw - (B b) - ~source:account1 - tx_rollup - Tx_rollup_level.root - ~context_hash - ~contents:(Script.lazy_expr contents) - ~ty:(Script.lazy_expr ty) - ~ticketer:deposit_contract - amount - ~destination:withdraw_contract - withdrawals_merkle_root - withdraw_path - ~withdraw_position - ~message_index:1 - entrypoint) - >>=? fun operation -> - Incremental.begin_construction b >>=? fun i -> - (* 5. try with wrong message_index *) - Incremental.add_operation - ~expect_failure:(check_proto_error Tx_rollup_errors.Withdraw_invalid_path) - i - operation - >>=? fun _i -> return_unit + Incremental.add_operation incr operation >>=? fun _i -> return_unit - (** [test_too_late_withdrawal] checks that attempting to withdraw from a - level of a commitment already removed fails. *) + (** [test_too_late_withdrawal] checks that attempting to withdraw from a level + of a commitment already removed fails. *) let test_too_late_withdrawal () = context_init1_withdraw () - >>=? fun (account1, tx_rollup, deposit_contract, withdraw_contract, b) -> + >>=? fun (account1, tx_rollup, deposit_contract, _withdraw_contract, block) + -> Nat_ticket.withdrawal - (B b) + (B block) ~ticketer:deposit_contract ~claimer:account1 tx_rollup - >>=? fun withdraw -> + >>=? fun (withdraw, ticket_info) -> + let message_index = 0 in + (* Make a commitment for the dummy batch. Mock the list of withdrawals as + per [withdrawals]. Include the commitment in an operation and bake. *) finalize_all_commitment_with_withdrawals ~account:account1 ~tx_rollup - ~withdrawals:[(0, [withdraw])] - b - >>=? fun (_commitment, context_hash_list, committed_level, b) -> + ~withdrawals:[(message_index, [withdraw])] + block + >>=? fun (_commitment, context_hash_list, committed_level, block) -> + let context_hash = + WithExceptions.Option.get ~loc:__LOC__ + @@ List.nth context_hash_list message_index + in (* Remove the commitment *) - Op.tx_rollup_remove_commitment (B b) account1 tx_rollup + Op.tx_rollup_remove_commitment (B block) account1 tx_rollup >>=? fun operation -> - Block.bake ~operation b >>=? fun b -> - (* At this point, the withdrawal can no longer be executed *) - (let entrypoint = Entrypoint.default in - let context_hash = - WithExceptions.Option.get ~loc:__LOC__ @@ List.nth context_hash_list 0 - in - let withdrawals_list = [withdraw] in - let withdraw_position = 0 in - wrap - @@ Tx_rollup_withdraw.Merkle.compute_path - withdrawals_list - withdraw_position - >>?= fun withdraw_path -> - let withdrawals_merkle_root = - Tx_rollup_withdraw.Merkle.merklize_list withdrawals_list - in - Op.tx_rollup_withdraw - (B b) - ~source:account1 - tx_rollup - committed_level - ~context_hash - ~contents:(Script.lazy_expr Nat_ticket.contents) - ~ty:(Script.lazy_expr Nat_ticket.ty) - ~ticketer:deposit_contract - Nat_ticket.amount - ~destination:withdraw_contract - withdrawals_merkle_root - withdraw_path - ~withdraw_position - ~message_index:0 - entrypoint) + Block.bake ~operation block >>=? fun block -> + (* At this point, the reveal can no longer be executed *) + Incremental.begin_construction block >>=? fun incr -> + Op.tx_rollup_dispatch_tickets + (I incr) + ~source:account1 + ~message_index + tx_rollup + committed_level + context_hash + [ticket_info] >>=? fun operation -> - Incremental.begin_construction b >>=? fun i -> - (* 5. try with correct withdraw but too late *) + (* try with correct withdraw but too late *) Incremental.add_operation ~expect_failure: (check_proto_error_f @@ function | Tx_rollup_errors.No_finalized_commitment_for_level {level; window = None} -> - Tx_rollup_level.(level = root) + Tx_rollup_level.(level = committed_level) | _error -> false) - i + incr operation >>=? fun _i -> return_unit @@ -4754,17 +4339,16 @@ module Withdraw = struct let test_withdrawal_accounting_is_cleaned_up_after_removal () = let open Error_monad_operators in context_init1_withdraw () - >>=? fun (account1, tx_rollup, deposit_contract, withdraw_contract, b) -> + >>=? fun (account1, tx_rollup, deposit_contract, _withdraw_contract, b) -> let assert_consumed b ~msg committed_level consumed_expected = Incremental.begin_construction b >>=? fun i -> let ctxt = Incremental.alpha_ctxt i in - Alpha_context.Tx_rollup_withdraw.mem + Alpha_context.Tx_rollup_reveal.mem ctxt tx_rollup committed_level - ~message_index:0 - ~withdraw_position:0 - >>=?? fun (consumed_actual, _) -> + ~message_position:0 + >>=?? fun (_, consumed_actual) -> Alcotest.(check bool msg consumed_expected consumed_actual) ; return_unit in @@ -4774,13 +4358,16 @@ module Withdraw = struct ~ticketer:deposit_contract ~claimer:account1 tx_rollup - >>=? fun withdraw -> + >>=? fun (withdraw, ticket_info) -> finalize_all_commitment_with_withdrawals ~account:account1 ~tx_rollup ~withdrawals:[(0, [withdraw])] b >>=? fun (_commitment, context_hash_list, committed_level, b) -> + let context_hash = + WithExceptions.Option.get ~loc:__LOC__ (List.nth context_hash_list 0) + in assert_consumed b ~msg:"should not be consumed before withdrawal" @@ -4788,38 +4375,19 @@ module Withdraw = struct false >>=? fun () -> (* Exexute with withdrawal *) - (let entrypoint = Entrypoint.default in - let context_hash = - WithExceptions.Option.get ~loc:__LOC__ @@ List.nth context_hash_list 0 - in - let withdrawals_list = [withdraw] in - let withdraw_position = 0 in - wrap - @@ Tx_rollup_withdraw.Merkle.compute_path - withdrawals_list - withdraw_position - >>?= fun withdraw_path -> - let withdrawals_merkle_root = - Tx_rollup_withdraw.Merkle.merklize_list withdrawals_list - in - Op.tx_rollup_withdraw - (B b) - ~source:account1 - tx_rollup - Tx_rollup_level.root - ~context_hash - ~contents:(Script.lazy_expr Nat_ticket.contents) - ~ty:(Script.lazy_expr Nat_ticket.ty) - ~ticketer:deposit_contract - Nat_ticket.amount - ~destination:withdraw_contract - withdrawals_merkle_root - withdraw_path - ~withdraw_position - ~message_index:0 - entrypoint) + Incremental.begin_construction b >>=? fun incr -> + Op.tx_rollup_dispatch_tickets + (I incr) + ~source:account1 + ~message_index:0 + tx_rollup + committed_level + context_hash + [ticket_info] >>=? fun operation -> - Block.bake ~operation b >>=? fun b -> + Incremental.begin_construction b >>=? fun i -> + Incremental.add_operation i operation >>=? fun i -> + Incremental.finalize_block i >>=? fun b -> assert_consumed b ~msg:"should be consumed after withdrawal" @@ -4829,7 +4397,9 @@ module Withdraw = struct (* Remove the commitment *) Op.tx_rollup_remove_commitment (B b) account1 tx_rollup >>=? fun operation -> - Block.bake ~operation b >>=? fun b -> + Incremental.begin_construction b >>=? fun i -> + Incremental.add_operation i operation >>=? fun i -> + Incremental.finalize_block i >>=? fun b -> assert_consumed b committed_level @@ -4855,15 +4425,14 @@ module Withdraw = struct | None -> [] in let message_result = - Tx_rollup_commitment. + Tx_rollup_message_result. { context_hash = after; - withdrawals_merkle_root = - Tx_rollup_withdraw.Merkle.merklize_list m1_withdrawals; + withdraw_list_hash = Tx_rollup_withdraw_list_hash.hash m1_withdrawals; } in let message_result_hash = - Tx_rollup_commitment.hash_message_result message_result + Tx_rollup_message_result_hash.hash message_result in let commitment = {commitment with messages = [message_result_hash]} in Op.tx_rollup_commit ctxt account tx_rollup commitment >>=? fun operation -> @@ -4932,7 +4501,7 @@ module Withdraw = struct ~claimer:account1 ~amount:(Tx_rollup_l2_qty.of_int64_exn max) tx_rollup - >>=? fun withdraw -> + >>=? fun (withdraw, _) -> Incremental.begin_construction b >>=? fun i -> Nat_ticket.ticket_hash (B b) ~ticketer:deposit_contract ~tx_rollup >>=? fun ticket_hash -> @@ -4991,58 +4560,39 @@ module Withdraw = struct [ Tztest.tztest "Test withdraw" `Quick test_valid_withdraw; Tztest.tztest - "Test withdraw w/ missing commitment" - `Quick - test_invalid_withdraw_no_commitment; - Tztest.tztest - "Test withdraw w/ missing withdraw in commitment" - `Quick - test_invalid_withdraw_missing_withdraw_in_commitment; - Tztest.tztest - "Test withdraw w/ invalid amount" + "Test reveal withdrawals w/ missing commitment" `Quick - test_invalid_withdraw_tickets; + test_invalid_reveal_withdrawals_no_commitment; Tztest.tztest - "Test withdraw w/ invalid proof" + "Test reveal withdrawals w/ missing withdraw in commitment" `Quick - test_invalid_withdraw_invalid_proof; + test_invalid_reveal_withdrawals_missing_withdraw_in_commitment; Tztest.tztest - "Test withdraw twice" + "Test reveal withdrawals w/ incorrect tickets info" `Quick - test_invalid_withdraw_already_consumed; + test_reveal_withdrawals_invalid_tickets_info; Tztest.tztest - "Test multiple withdrawals from the same batch" + "Test to reveal withdrawals twice" `Quick - test_multiple_withdrawals_same_batch; - Tztest.tztest - "Test multiple withdrawals from the same inbox (but different batches)" - `Quick - test_multiple_withdrawals_same_inbox; - Tztest.tztest - "Test withdraw someone elses's withdraw" - `Quick - test_invalid_withdraw_someone_elses; - Tztest.tztest - "Test withdraw with an ill-typed entrypoint" - `Quick - test_invalid_withdraw_illtyped_entrypoint; - Tztest.tztest - "Test withdraw with missing entrypoint" - `Quick - test_invalid_withdraw_bad_entrypoint; + test_reveal_withdrawals_twice; Tztest.tztest "Test withdraw w/ an invalid message index" `Quick - test_invalid_message_index; + test_invalid_index_or_context; Tztest.tztest "Test withdrawing too late" `Quick test_too_late_withdrawal; Tztest.tztest - "Test withdrawing is cleaned up after removal" + "Test storage clean up" `Quick test_withdrawal_accounting_is_cleaned_up_after_removal; Tztest.tztest "Test deposits overflowing to withdrawals" `Quick test_deposit_overflow_to_withdrawal; + Tztest.tztest + "Test multiple withdrawals from the same batch and from different \ + batches" + `Quick + test_multiple_withdrawals_multiple_batches; ] end diff --git a/src/proto_alpha/lib_protocol/test/pbt/dune b/src/proto_alpha/lib_protocol/test/pbt/dune index 63ea4b5efc44..7a94c6ae263a 100644 --- a/src/proto_alpha/lib_protocol/test/pbt/dune +++ b/src/proto_alpha/lib_protocol/test/pbt/dune @@ -8,7 +8,6 @@ test_script_comparison test_tez_repr test_tx_rollup_l2_encoding - test_tx_rollup_l2_withdraw_storage test_bitset test_sc_rollup_tick_repr refutation_game_pbt diff --git a/src/proto_alpha/lib_protocol/ticket_storage.mli b/src/proto_alpha/lib_protocol/ticket_storage.mli index 433f64b85a96..9e02e4037574 100644 --- a/src/proto_alpha/lib_protocol/ticket_storage.mli +++ b/src/proto_alpha/lib_protocol/ticket_storage.mli @@ -23,7 +23,9 @@ (* *) (*****************************************************************************) -type error += Used_storage_space_underflow +type error += + | Negative_ticket_balance of {key : Ticket_hash_repr.t; balance : Z.t} + | Used_storage_space_underflow (** [get_balance ctxt key] receives the ticket balance for the given [key] in the context [ctxt]. The [key] represents a ticket content and a 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 1812255f94b5..b1c9fa5252ae 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_commitment_repr.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_commitment_repr.ml @@ -25,56 +25,6 @@ (* *) (*****************************************************************************) -module Message_result_hash = struct - let message_result_hash = - Tx_rollup_prefixes.message_result_hash.b58check_prefix - - module H = - Blake2B.Make - (Base58) - (struct - let name = "Message_result_hash" - - let title = "A message result" - - let b58check_prefix = message_result_hash - - let size = Some Tx_rollup_prefixes.message_result_hash.hash_size - end) - - include H - include Path_encoding.Make_hex (H) - - let () = - Tx_rollup_prefixes.(check_encoding message_result_hash b58check_encoding) -end - -type message_result = { - context_hash : Context_hash.t; - withdrawals_merkle_root : Tx_rollup_withdraw_repr.Merkle.root; -} - -let message_result_encoding = - let open Data_encoding in - conv - (fun {context_hash; withdrawals_merkle_root} -> - (context_hash, withdrawals_merkle_root)) - (fun (context_hash, withdrawals_merkle_root) -> - {context_hash; withdrawals_merkle_root}) - (obj2 - (req "context_hash" Context_hash.encoding) - (req - "withdrawals_merkle_root" - Tx_rollup_withdraw_repr.Merkle.root_encoding)) - -let hash_message_result result = - let bytes = - Data_encoding.Binary.to_bytes_exn message_result_encoding result - in - Message_result_hash.hash_bytes [bytes] - -let pp_message_result_hash = Message_result_hash.pp - module Commitment_hash = struct let commitment_hash = Tx_rollup_prefixes.commitment_hash.b58check_prefix @@ -113,7 +63,7 @@ end type t = { level : Tx_rollup_level_repr.t; - messages : Message_result_hash.t list; + messages : Tx_rollup_message_result_hash_repr.t list; predecessor : Commitment_hash.t option; inbox_merkle_root : Tx_rollup_inbox_repr.Merkle.root; } @@ -123,7 +73,7 @@ let compare_or cmp c1 c2 f = match cmp c1 c2 with 0 -> f () | diff -> diff include Compare.Make (struct type nonrec t = t - module Compare_root_list = Compare.List (Message_result_hash) + module Compare_root_list = Compare.List (Tx_rollup_message_result_hash_repr) let compare r1 r2 = compare_or Tx_rollup_level_repr.compare r1.level r2.level (fun () -> @@ -145,24 +95,13 @@ let pp : Format.formatter -> t -> unit = "commitment %a : messages = %a predecessor %a for inbox with merkle root %a" Tx_rollup_level_repr.pp t.level - (Format.pp_print_list Message_result_hash.pp) + (Format.pp_print_list Tx_rollup_message_result_hash_repr.pp) t.messages (Format.pp_print_option Commitment_hash.pp) t.predecessor Tx_rollup_inbox_repr.Merkle.pp_root t.inbox_merkle_root -let empty_l2_context_hash = - Context_hash.of_b58check_exn - "CoVu7Pqp1Gh3z33mink5T5Q2kAQKtnn3GHxVhyehdKZpQMBxFBGF" - -let initial_message_result_hash = - hash_message_result - { - context_hash = empty_l2_context_hash; - withdrawals_merkle_root = Tx_rollup_withdraw_repr.Merkle.empty; - } - let encoding = let open Data_encoding in conv @@ -172,7 +111,7 @@ let encoding = {level; messages; predecessor; inbox_merkle_root}) (obj4 (req "level" Tx_rollup_level_repr.encoding) - (req "batches" (list Message_result_hash.encoding)) + (req "batches" (list Tx_rollup_message_result_hash_repr.encoding)) (req "predecessor" (option Commitment_hash.encoding)) (req "inbox_merkle_root" Tx_rollup_inbox_repr.Merkle.root_encoding)) @@ -180,11 +119,12 @@ let hash c = let bytes = Data_encoding.Binary.to_bytes_exn encoding c in Commitment_hash.hash_bytes [bytes] -let check_message_result : t -> message_result -> message_index:int -> bool = +let check_message_result : + t -> Tx_rollup_message_result_repr.t -> message_index:int -> bool = fun {messages; _} result ~message_index -> - let computed = hash_message_result result in + let computed = Tx_rollup_message_result_hash_repr.hash result in match List.nth messages message_index with - | Some expected -> Message_result_hash.(computed = expected) + | Some expected -> Tx_rollup_message_result_hash_repr.(computed = expected) | None -> false module Index = struct 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 2d83b6b14342..162570d3fde6 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_commitment_repr.mli +++ b/src/proto_alpha/lib_protocol/tx_rollup_commitment_repr.mli @@ -33,51 +33,6 @@ module Commitment_hash : sig include S.HASH end -(** The hash of the result of a layer-2 operation: that is, the hash - of [(l2_ctxt_hash ^ withdraw_hash)] where [l2_ctxt_hash] is the Merkle - tree root of the L2 context after any message (ie. deposit or batch), - and [withdraw_hash] is a [Tx_rollup_withdraw_repr.withdrawals_merkle_root] *) -module Message_result_hash : S.HASH - -type message_result = { - context_hash : Context_hash.t; - withdrawals_merkle_root : Tx_rollup_withdraw_repr.Merkle.root; -} - -val message_result_encoding : message_result Data_encoding.t - -(** [hash_message_result result] computes the [Message_result_hash.t] - of the given context hash and withdraw list hash, that is - [hash(result.context_hash @ result.withdrawals_merkle_root))]. *) -val hash_message_result : message_result -> Message_result_hash.t - -val pp_message_result_hash : Format.formatter -> Message_result_hash.t -> unit - -(** [empty_l2_context_hash] is the context hash of the layer-2 context - just after its origination. - - The empty layer2 context hash is the hash of the underlying Irmin tree. - One important note is: an empty tree *must* not be hashed when it's empty. - See https://github.com/mirage/irmin/issues/1304. - - Our solution is to write data in the tree to have a non-empty one. - We write the {!Tx_rollup_l2_context.Ticket_count} default value (i.e. 0) - and the {!Tx_rollup_l2_context.Address_count} as well in the tree. Then - we hash the resulting tree to create this constant. -*) -val empty_l2_context_hash : Context_hash.t - -(** [initial_message_result_hash] is equal to - -{[ -hash_message_result - { - context_hash = empty_l2_context_hash; - withdrawals_merkle_root = Tx_rollup_withdraw_repr.empty_withdrawals_merkle_root; - } -]} *) -val initial_message_result_hash : Message_result_hash.t - (** A commitment describes the interpretation of the messages stored in the inbox of a particular [level], on top of a particular layer-2 context. @@ -90,7 +45,7 @@ val initial_message_result_hash : Message_result_hash.t empty tree. *) type t = { level : Tx_rollup_level_repr.t; - messages : Message_result_hash.t list; + messages : Tx_rollup_message_result_hash_repr.t list; predecessor : Commitment_hash.t option; inbox_merkle_root : Tx_rollup_inbox_repr.Merkle.root; } @@ -106,7 +61,8 @@ val hash : t -> Commitment_hash.t (** [check_message_result commitment result message_index] returns true if the message result hash of the batch in [commitment] indexed by [message_index] corresponds to the hash of [result]. *) -val check_message_result : t -> message_result -> message_index:int -> bool +val check_message_result : + t -> Tx_rollup_message_result_repr.t -> message_index:int -> bool module Index : Storage_description.INDEX with type t = Commitment_hash.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 880d97d95461..0d8c734869a7 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_commitment_storage.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_commitment_storage.ml @@ -103,12 +103,11 @@ let get : let get_finalized : Raw_context.t -> Tx_rollup_repr.t -> + Tx_rollup_state_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 -> - Tx_rollup_state_storage.assert_exist ctxt tx_rollup >>=? fun ctxt -> - Storage.Tx_rollup.State.get ctxt tx_rollup >>=? fun (ctxt, state) -> + fun ctxt tx_rollup state level -> let window = Tx_rollup_state_repr.finalized_commitments_range state in (match window with | Some (first, last) -> @@ -193,7 +192,8 @@ let add_commitment ctxt tx_rollup state pkh commitment = Storage.Tx_rollup.Commitment.add ctxt (commitment.level, tx_rollup) submitted >>=? fun (ctxt, commitment_size_alloc, _) -> let commitment_message_hash_preallocations = - List.length commitment.messages * Message_result_hash.size + List.length commitment.messages + * Tx_rollup_prefixes.message_result_hash.hash_size in let commitment_size_alloc_sans_preallocations = commitment_size_alloc - commitment_message_hash_preallocations @@ -300,11 +300,7 @@ let remove_commitment ctxt rollup state = state ~delta:(Z.of_int freed_size |> Z.neg) >>?= fun (state, _paid_storage_size_diff) -> - let inbox_length = - (* safe because inbox cannot be more than int32 *) - Int32.of_int @@ List.length commitment.commitment.messages - in - Tx_rollup_withdraw_storage.remove ctxt state rollup tail ~inbox_length + Tx_rollup_reveal_storage.remove ctxt rollup state tail >>=? fun (ctxt, state) -> (* We update the state *) (match List.last_opt commitment.commitment.messages with @@ -340,11 +336,7 @@ let get_before_and_after_results ctxt tx_rollup let level = commitment.level in if Compare.Int.(message_position = 0) then match Tx_rollup_level_repr.pred level with - | None -> - return - ( ctxt, - Tx_rollup_commitment_repr.initial_message_result_hash, - after_hash ) + | None -> return (ctxt, Tx_rollup_message_result_hash_repr.init, after_hash) | Some pred_level -> ( Storage.Tx_rollup.Commitment.find ctxt (pred_level, tx_rollup) >>=? function 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 6c0e388f317c..dde22eb7ce3b 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_commitment_storage.mli +++ b/src/proto_alpha/lib_protocol/tx_rollup_commitment_storage.mli @@ -113,6 +113,7 @@ val get : val get_finalized : Raw_context.t -> Tx_rollup_repr.t -> + Tx_rollup_state_repr.t -> Tx_rollup_level_repr.t -> (Raw_context.t * Tx_rollup_commitment_repr.Submitted_commitment.t) tzresult Lwt.t @@ -186,7 +187,7 @@ val get_before_and_after_results : message_position:int -> Tx_rollup_state_repr.t -> (Raw_context.t - * Tx_rollup_commitment_repr.Message_result_hash.t - * Tx_rollup_commitment_repr.Message_result_hash.t) + * Tx_rollup_message_result_hash_repr.t + * Tx_rollup_message_result_hash_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 index 3c66f21a64c6..4cc796ba62d9 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_errors_repr.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_errors_repr.ml @@ -36,6 +36,7 @@ type error += | Message_size_exceeds_limit | Too_many_inboxes | Too_many_commitments + | Too_many_withdrawals | Wrong_batch_count | Commitment_too_early of { provided : Tx_rollup_level_repr.t; @@ -47,7 +48,6 @@ type error += | 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; @@ -68,22 +68,24 @@ type error += } | Withdraw_invalid_path | Withdraw_already_consumed + | Withdrawals_invalid_path + | Withdrawals_already_dispatched | Commitment_bond_negative of int | Cannot_reject_level of { provided : Tx_rollup_level_repr.t; accepted_range : (Tx_rollup_level_repr.t * Tx_rollup_level_repr.t) option; } | Wrong_rejection_hashes of { - provided : Tx_rollup_commitment_repr.message_result; - computed : Tx_rollup_commitment_repr.Message_result_hash.t; - expected : Tx_rollup_commitment_repr.Message_result_hash.t; + provided : Tx_rollup_message_result_repr.t; + computed : Tx_rollup_message_result_hash_repr.t; + expected : Tx_rollup_message_result_hash_repr.t; } | Ticket_payload_size_limit_exceeded of {payload_size : int; limit : int} - | Deposit_wrong_ticketer of Tx_rollup_repr.t | Wrong_deposit_parameters | Proof_failed_to_reject | Proof_produced_rejected_state | Proof_invalid_before of {agreed : Context_hash.t; provided : Context_hash.t} + | No_withdrawals_to_dispatch let () = let open Data_encoding in @@ -201,6 +203,15 @@ let () = empty (function Too_many_commitments -> Some () | _ -> None) (fun () -> Too_many_commitments) ; + (* Tx_rollup_too_many_withdrawals *) + register_error_kind + `Temporary + ~id:"tx_rollup_too_many_withdrawals" + ~title:"Cannot dispatch that many withdrawals" + ~description:"Cannot dispatch that many withdrawals" + empty + (function Too_many_withdrawals -> Some () | _ -> None) + (fun () -> Too_many_withdrawals) ; (* Wrong_batch_count *) register_error_kind `Temporary @@ -279,15 +290,6 @@ let () = 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 @@ -463,6 +465,28 @@ let () = empty (function Withdraw_invalid_path -> Some () | _ -> None) (fun () -> Withdraw_invalid_path) ; + (* Withdrawals_invalid_path *) + register_error_kind + `Branch + ~id:"tx_rollup_withdrawals_invalid_path" + ~title:"The validation path submitted for a withdrawal is invalid" + ~description: + "The validation path submitted for a withdrawal is not valid for the \ + given withdrawal and message index" + empty + (function Withdrawals_invalid_path -> Some () | _ -> None) + (fun () -> Withdrawals_invalid_path) ; + (* Withdrawals_already_dispatched *) + register_error_kind + `Branch + ~id:"operation.withdrawals_already_dispatched" + ~title:"withdrawals already dispatched" + ~description: + "The withdrawals have already been dispatched to their layer-1 \ + beneficiary" + Data_encoding.unit + (function Withdrawals_already_dispatched -> Some () | _ -> None) + (fun () -> Withdrawals_already_dispatched) ; register_error_kind `Temporary ~id:"operation.withdraw_already_consumed" @@ -526,9 +550,9 @@ let () = "The message result hash recomputed from the rejection argument is \ invalid" (obj3 - (req "provided" Tx_rollup_commitment_repr.message_result_encoding) - (req "computed" Tx_rollup_commitment_repr.Message_result_hash.encoding) - (req "expected" Tx_rollup_commitment_repr.Message_result_hash.encoding)) + (req "provided" Tx_rollup_message_result_repr.encoding) + (req "computed" Tx_rollup_message_result_hash_repr.encoding) + (req "expected" Tx_rollup_message_result_hash_repr.encoding)) (function | Wrong_rejection_hashes {provided; computed; expected} -> Some (provided, computed, expected) @@ -548,24 +572,6 @@ let () = | _ -> None) (fun (payload_size, limit) -> Ticket_payload_size_limit_exceeded {payload_size; limit}) ; - register_error_kind - `Permanent - ~id:"tx_rollup_deposit_wrong_ticketer" - ~title: - "The ticketer submitted in the ticket is a tx rollup instead of a \ - contract." - ~description: - "The ticketer provided with the ticket on the deposit transaction is a \ - tx_rollup which is not possible." - ~pp:(fun ppf tx_rollup -> - Format.fprintf - ppf - "A tx_rollup (%a) can't be the ticketer of a ticket" - Tx_rollup_repr.pp - tx_rollup) - (obj1 (req "tx_rollup" Tx_rollup_repr.encoding)) - (function Deposit_wrong_ticketer tx_rollup -> Some tx_rollup | _ -> None) - (fun tx_rollup -> Deposit_wrong_ticketer tx_rollup) ; (* Proof_failed_to_reject *) register_error_kind `Temporary @@ -601,4 +607,12 @@ let () = (function | Proof_invalid_before {agreed; provided} -> Some (agreed, provided) | _ -> None) - (fun (agreed, provided) -> Proof_invalid_before {agreed; provided}) + (fun (agreed, provided) -> Proof_invalid_before {agreed; provided}) ; + register_error_kind + `Permanent + ~id:"tx_rollup_no_withdrawals_to_dispatch" + ~title:"Trying to dispatch withdrawals when none happened" + ~description:"Cannot dispatch an empty list of withdrawals" + empty + (function No_withdrawals_to_dispatch -> Some () | _ -> None) + (fun () -> No_withdrawals_to_dispatch) 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 0f3c1c5ba5ed..a16582f10c87 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_inbox_storage.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_inbox_storage.ml @@ -216,7 +216,7 @@ let append_message : total amount of pre-payed storage burn when calculating the storage burn of adding the commitment. *) let commitment_message_hash_preallocation = - Tx_rollup_commitment_repr.Message_result_hash.size + Tx_rollup_prefixes.message_result_hash.hash_size in Tx_rollup_state_repr.adjust_storage_allocation new_state diff --git a/src/proto_alpha/lib_protocol/tx_rollup_l2_apply.ml b/src/proto_alpha/lib_protocol/tx_rollup_l2_apply.ml index 9d31271838fe..a0aa2e90516e 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_l2_apply.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_l2_apply.ml @@ -582,7 +582,7 @@ module Make (Context : CONTEXT) = struct indexes -> Signer_indexable.index -> 'content operation_content -> - (ctxt * indexes * Tx_rollup_withdraw.withdrawal option) m = + (ctxt * indexes * Tx_rollup_withdraw.t option) m = fun ctxt indexes source_idx op_content -> match op_content with | Withdraw {destination = claimer; ticket_hash; qty = amount} -> @@ -632,7 +632,7 @@ module Make (Context : CONTEXT) = struct ctxt -> indexes -> (Indexable.index_only, Indexable.unknown) operation -> - (ctxt * indexes * Tx_rollup_withdraw.withdrawal list) m = + (ctxt * indexes * Tx_rollup_withdraw.t list) m = fun ctxt indexes {signer; counter; contents} -> (* Before applying any operation, we check the counter *) let* () = check_counter ctxt signer counter in @@ -658,11 +658,7 @@ module Make (Context : CONTEXT) = struct ctxt -> indexes -> (Indexable.index_only, Indexable.unknown) transaction -> - (ctxt - * indexes - * transaction_result - * Tx_rollup_withdraw.withdrawal list) - m = + (ctxt * indexes * transaction_result * Tx_rollup_withdraw.t list) m = fun initial_ctxt initial_indexes transaction -> let rec fold (ctxt, prev_indexes, withdrawals) index ops = match ops with @@ -707,8 +703,7 @@ module Make (Context : CONTEXT) = struct ctxt -> parameters -> (Indexable.unknown, Indexable.unknown) t -> - (ctxt * Message_result.Batch_V1.t * Tx_rollup_withdraw.withdrawal list) - m = + (ctxt * Message_result.Batch_V1.t * Tx_rollup_withdraw.t list) m = fun ctxt parameters batch -> let* (ctxt, indexes, batch) = check_signature ctxt batch in let {contents; _} = batch in @@ -743,7 +738,7 @@ module Make (Context : CONTEXT) = struct let apply_deposit : ctxt -> Tx_rollup_message.deposit -> - (ctxt * deposit_result * Tx_rollup_withdraw.withdrawal option) m = + (ctxt * deposit_result * Tx_rollup_withdraw.t option) m = fun initial_ctxt Tx_rollup_message.{sender; destination; ticket_hash; amount} -> let apply_deposit () = let* (ctxt, indexes, aidx) = diff --git a/src/proto_alpha/lib_protocol/tx_rollup_l2_apply.mli b/src/proto_alpha/lib_protocol/tx_rollup_l2_apply.mli index 008df0a5b766..44619b09fe58 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_l2_apply.mli +++ b/src/proto_alpha/lib_protocol/tx_rollup_l2_apply.mli @@ -111,7 +111,7 @@ module Message_result : sig (* In addition to [message_result] the result contains the list of withdrawals that result from failing deposits and layer2-to-layer1 transfers. *) - type t = message_result * Tx_rollup_withdraw.withdrawal list + type t = message_result * Tx_rollup_withdraw.t list val encoding : t Data_encoding.t end @@ -154,7 +154,7 @@ module Make (Context : CONTEXT) : sig ctxt -> parameters -> (Indexable.unknown, Indexable.unknown) t -> - (ctxt * Message_result.Batch_V1.t * Tx_rollup_withdraw.withdrawal list) m + (ctxt * Message_result.Batch_V1.t * Tx_rollup_withdraw.t list) m (** [check_signature ctxt batch] asserts that [batch] is correctly signed. @@ -201,10 +201,7 @@ module Make (Context : CONTEXT) : sig val apply_deposit : ctxt -> Tx_rollup_message.deposit -> - (ctxt - * Message_result.deposit_result - * Tx_rollup_withdraw.withdrawal option) - m + (ctxt * Message_result.deposit_result * Tx_rollup_withdraw.t option) m (** [apply_message ctxt parameters message] interprets the [message] in the [ctxt]. diff --git a/src/proto_alpha/lib_protocol/tx_rollup_l2_verifier.ml b/src/proto_alpha/lib_protocol/tx_rollup_l2_verifier.ml index e295ae2f0374..9983814b442a 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_l2_verifier.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_l2_verifier.ml @@ -61,8 +61,8 @@ module Verifier_context = Tx_rollup_l2_context.Make (Verifier_storage) module Verifier_apply = Tx_rollup_l2_apply.Make (Verifier_context) let hash_message_result after withdraw = - Alpha_context.Tx_rollup_commitment.hash_message_result - {context_hash = after; withdrawals_merkle_root = withdraw} + Alpha_context.Tx_rollup_message_result_hash.hash + {context_hash = after; withdraw_list_hash = withdraw} (** [after_hash_when_proof_failed before] produces the {!Alpha_context.Tx_rollup_message_result_hash} expected if a proof failed. @@ -70,7 +70,7 @@ let hash_message_result after withdraw = withdrawals. *) let after_hash_when_proof_failed before = let open Alpha_context in - hash_message_result before Tx_rollup_withdraw.Merkle.empty + hash_message_result before Tx_rollup_withdraw_list_hash.empty (** [compute_proof_after_hash ~max_proof_size agreed proof message] computes the after hash expected while verifying [proof] on [message] starting from @@ -116,13 +116,13 @@ let compute_proof_after_hash ~max_proof_size parameters agreed proof message = return (hash_message_result tree_hash - (Alpha_context.Tx_rollup_withdraw.Merkle.merklize_list withdrawals)) + (Alpha_context.Tx_rollup_withdraw_list_hash.hash withdrawals)) | Error _ -> (* Finally, the proof verification leads to an internal Irmin error *) fail Proof_failed_to_reject let verify_proof parameters message proof - ~(agreed : Alpha_context.Tx_rollup_commitment.message_result) ~rejected + ~(agreed : Alpha_context.Tx_rollup_message_result.t) ~rejected ~max_proof_size = compute_proof_after_hash parameters diff --git a/src/proto_alpha/lib_protocol/tx_rollup_l2_verifier.mli b/src/proto_alpha/lib_protocol/tx_rollup_l2_verifier.mli index 51ee28c2afc9..1fa9c3f2f91a 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_l2_verifier.mli +++ b/src/proto_alpha/lib_protocol/tx_rollup_l2_verifier.mli @@ -49,7 +49,7 @@ val verify_proof : Tx_rollup_l2_apply.parameters -> Tx_rollup_message.t -> Tx_rollup_l2_proof.t -> - agreed:Tx_rollup_commitment.message_result -> + agreed:Tx_rollup_message_result.t -> rejected:Tx_rollup_message_result_hash.t -> max_proof_size:int -> unit tzresult Lwt.t diff --git a/src/proto_alpha/lib_protocol/tx_rollup_message_repr.ml b/src/proto_alpha/lib_protocol/tx_rollup_message_repr.ml index bb0a7d57f0ec..dd0e56646a72 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_message_repr.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_message_repr.ml @@ -146,3 +146,24 @@ let hash_uncarbonated msg = Message_hash.hash_bytes [Data_encoding.Binary.to_bytes_exn encoding msg] let hash_equal = Message_hash.equal + +type error += Negative_message_index of int | Too_big_message_index of int + +let () = + let open Data_encoding in + register_error_kind + `Permanent + ~id:"tx_rollup_negative_message_index" + ~title:"The message index must be non-negative" + ~description:"The message index must be non-negative" + (obj1 (req "message_position" int31)) + (function Negative_message_index i -> Some i | _ -> None) + (fun i -> Negative_message_index i) ; + register_error_kind + `Permanent + ~id:"tx_rollup_invalid_message_argument" + ~title:"The message index must be less than 64" + ~description:"The message index must be less than 64" + (obj1 (req "message_position" int31)) + (function Too_big_message_index i -> Some i | _ -> None) + (fun i -> Too_big_message_index i) diff --git a/src/proto_alpha/lib_protocol/test/pbt/test_tx_rollup_l2_withdraw_storage.ml b/src/proto_alpha/lib_protocol/tx_rollup_message_result_hash_repr.ml similarity index 54% rename from src/proto_alpha/lib_protocol/test/pbt/test_tx_rollup_l2_withdraw_storage.ml rename to src/proto_alpha/lib_protocol/tx_rollup_message_result_hash_repr.ml index 7b7e8f50bb57..45182e039e00 100644 --- a/src/proto_alpha/lib_protocol/test/pbt/test_tx_rollup_l2_withdraw_storage.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_message_result_hash_repr.ml @@ -1,7 +1,9 @@ (*****************************************************************************) (* *) (* Open Source License *) -(* Copyright (c) 2022 Nomadic Labs, *) +(* 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"),*) @@ -23,65 +25,33 @@ (* *) (*****************************************************************************) -(** Testing - ------- - Component: Protocol Library - Invocation: dune exec src/proto_alpha/lib_protocol/test/pbt/test_tx_rollup_l2_withdraw_storage.exe - Subject: Tx rollup l2 withdraw storage -*) +let message_result_hash = Tx_rollup_prefixes.message_result_hash.b58check_prefix -open Lib_test.Qcheck2_helpers +module H = + Blake2B.Make + (Base58) + (struct + let name = "Message_result_hash" -open Protocol.Tx_rollup_withdraw_repr.Withdrawal_accounting + let title = "A message result hash" -let gen_ofs = QCheck2.Gen.int_bound (64 * 10) + let b58check_prefix = message_result_hash -let gen_storage = - let open QCheck2.Gen in - let* bool_vector = list bool in - match - List.fold_left_i_e - (fun i storage v -> if v then set storage i else ok storage) - empty - bool_vector - with - | Ok v -> return v - | Error e -> - Alcotest.failf - "An unxpected error %a occurred when generating Withdrawal_accounting.t" - Protocol.Environment.Error_monad.pp_trace - e + let size = Some Tx_rollup_prefixes.message_result_hash.hash_size + end) -let test_get_set (c, ofs) = - List.for_all - (fun ofs' -> - let res = - let open Tzresult_syntax in - let* c' = set c ofs in - let* v = get c ofs' in - let* v' = get c' ofs' in - return (if ofs = ofs' then v' = true else v = v') - in - match res with - | Error e -> - Alcotest.failf - "Unexpected error: %a" - Protocol.Environment.Error_monad.pp_trace - e - | Ok res -> res) - (0 -- 63) +include H +include Path_encoding.Make_hex (H) let () = - Alcotest.run - "bits" - [ - ( "quantity", - qcheck_wrap - [ - QCheck2.Test.make - ~count:10000 - ~name:"get set" - QCheck2.Gen.(pair gen_storage gen_ofs) - test_get_set; - ] ); - ] + Tx_rollup_prefixes.(check_encoding message_result_hash b58check_encoding) + +let hash result = + let bytes = + Data_encoding.Binary.to_bytes_exn + Tx_rollup_message_result_repr.encoding + result + in + H.hash_bytes [bytes] + +let init = hash Tx_rollup_message_result_repr.init diff --git a/src/proto_alpha/lib_protocol/tx_rollup_message_result_hash_repr.mli b/src/proto_alpha/lib_protocol/tx_rollup_message_result_hash_repr.mli new file mode 100644 index 000000000000..51d9052e6348 --- /dev/null +++ b/src/proto_alpha/lib_protocol/tx_rollup_message_result_hash_repr.mli @@ -0,0 +1,39 @@ +(*****************************************************************************) +(* *) +(* 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. *) +(* *) +(*****************************************************************************) + +(** The hash of the result of a layer-2 operation: that is, the hash + of [(l2_ctxt_hash ^ withdraw_hash)] where [l2_ctxt_hash] is the Merkle + tree root of the L2 context after any message (ie. deposit or batch), + and [withdraw_hash] is a [Tx_rollup_withdraw_repr.withdrawals_merkle_root] *) + +include S.HASH + +(** [hash result] computes the hash of the given context hash and + withdraw list hash. *) +val hash : Tx_rollup_message_result_repr.t -> t + +val init : t diff --git a/src/proto_alpha/lib_protocol/tx_rollup_message_result_repr.ml b/src/proto_alpha/lib_protocol/tx_rollup_message_result_repr.ml new file mode 100644 index 000000000000..87d1d09d07a3 --- /dev/null +++ b/src/proto_alpha/lib_protocol/tx_rollup_message_result_repr.ml @@ -0,0 +1,52 @@ +(*****************************************************************************) +(* *) +(* 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 = { + context_hash : Context_hash.t; + withdraw_list_hash : Tx_rollup_withdraw_list_hash_repr.t; +} + +let encoding = + let open Data_encoding in + conv + (fun {context_hash; withdraw_list_hash} -> + (context_hash, withdraw_list_hash)) + (fun (context_hash, withdraw_list_hash) -> + {context_hash; withdraw_list_hash}) + (obj2 + (req "context_hash" Context_hash.encoding) + (req "withdraw_list_hash" Tx_rollup_withdraw_list_hash_repr.encoding)) + +let empty_l2_context_hash = + Context_hash.of_b58check_exn + "CoVu7Pqp1Gh3z33mink5T5Q2kAQKtnn3GHxVhyehdKZpQMBxFBGF" + +let init = + { + context_hash = empty_l2_context_hash; + withdraw_list_hash = Tx_rollup_withdraw_list_hash_repr.empty; + } diff --git a/src/proto_alpha/lib_protocol/tx_rollup_message_result_repr.mli b/src/proto_alpha/lib_protocol/tx_rollup_message_result_repr.mli new file mode 100644 index 000000000000..f5147ca1da88 --- /dev/null +++ b/src/proto_alpha/lib_protocol/tx_rollup_message_result_repr.mli @@ -0,0 +1,47 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2022 Nomadic Labs *) +(* *) +(* 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 = { + context_hash : Context_hash.t; + withdraw_list_hash : Tx_rollup_withdraw_list_hash_repr.t; +} + +val encoding : t Data_encoding.t + +val init : t + +(** [empty_l2_context_hash] is the context hash of the layer-2 context + just after its origination. + + The empty layer2 context hash is the hash of the underlying Irmin tree. + One important note is: an empty tree *must* not be hashed when it's empty. + See https://github.com/mirage/irmin/issues/1304. + + Our solution is to write data in the tree to have a non-empty one. + We write the {!Tx_rollup_l2_context.Ticket_count} default value (i.e. 0) + and the {!Tx_rollup_l2_context.Address_count} as well in the tree. Then + we hash the resulting tree to create this constant. +*) +val empty_l2_context_hash : Context_hash.t diff --git a/src/proto_alpha/lib_protocol/tx_rollup_reveal_repr.ml b/src/proto_alpha/lib_protocol/tx_rollup_reveal_repr.ml new file mode 100644 index 000000000000..79f345c77b7f --- /dev/null +++ b/src/proto_alpha/lib_protocol/tx_rollup_reveal_repr.ml @@ -0,0 +1,46 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2022 Nomadic Labs *) +(* *) +(* 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 = { + contents : Script_repr.lazy_expr; + ty : Script_repr.lazy_expr; + ticketer : Contract_repr.t; + amount : Tx_rollup_l2_qty.t; + claimer : Signature.Public_key_hash.t; +} + +let encoding : t Data_encoding.t = + let open Data_encoding in + conv + (fun {contents; ty; ticketer; amount; claimer} -> + (contents, ty, ticketer, amount, claimer)) + (fun (contents, ty, ticketer, amount, claimer) -> + {contents; ty; ticketer; amount; claimer}) + (obj5 + (req "contents" Script_repr.lazy_expr_encoding) + (req "ty" Script_repr.lazy_expr_encoding) + (req "ticketer" Contract_repr.encoding) + (req "amount" Tx_rollup_l2_qty.encoding) + (req "claimer" Signature.Public_key_hash.encoding)) diff --git a/src/proto_alpha/lib_protocol/tx_rollup_reveal_repr.mli b/src/proto_alpha/lib_protocol/tx_rollup_reveal_repr.mli new file mode 100644 index 000000000000..8edf6de3d627 --- /dev/null +++ b/src/proto_alpha/lib_protocol/tx_rollup_reveal_repr.mli @@ -0,0 +1,36 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2022 Nomadic Labs *) +(* *) +(* 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. *) +(* *) +(*****************************************************************************) + +(** A reveal provides what is necessary to recompute a + {!Tx_rollup_withdrawal.t} message. *) +type t = { + contents : Script_repr.lazy_expr; + ty : Script_repr.lazy_expr; + ticketer : Contract_repr.t; + amount : Tx_rollup_l2_qty.t; + claimer : Signature.Public_key_hash.t; +} + +val encoding : t Data_encoding.t diff --git a/src/proto_alpha/lib_protocol/tx_rollup_reveal_storage.ml b/src/proto_alpha/lib_protocol/tx_rollup_reveal_storage.ml new file mode 100644 index 000000000000..14659d7095e3 --- /dev/null +++ b/src/proto_alpha/lib_protocol/tx_rollup_reveal_storage.ml @@ -0,0 +1,59 @@ +(*****************************************************************************) +(* *) +(* 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. *) +(* *) +(*****************************************************************************) + +let record ctxt tx_rollup state level ~message_position = + Storage.Tx_rollup.Revealed_withdrawals.find (ctxt, level) tx_rollup + >>=? fun (ctxt, revealed_withdrawals_opt) -> + Bitset.add + (Option.value ~default:Bitset.empty revealed_withdrawals_opt) + message_position + >>?= fun revealed_withdrawals -> + Storage.Tx_rollup.Revealed_withdrawals.add + (ctxt, level) + tx_rollup + revealed_withdrawals + >>=? fun (ctxt, new_size, _is_new) -> + Tx_rollup_state_repr.adjust_storage_allocation + state + ~delta:(Z.of_int new_size) + >>?= fun (state, diff) -> return (ctxt, state, diff) + +let mem ctxt tx_rollup level ~message_position = + Storage.Tx_rollup.Revealed_withdrawals.find (ctxt, level) tx_rollup + >>=? fun (ctxt, revealed_withdrawals_opt) -> + match revealed_withdrawals_opt with + | Some field -> + Bitset.mem field message_position >>?= fun res -> return (ctxt, res) + | None -> return (ctxt, false) + +let remove ctxt tx_rollup state level = + Storage.Tx_rollup.Revealed_withdrawals.remove (ctxt, level) tx_rollup + >>=? fun (ctxt, freed_size, _existed) -> + Tx_rollup_state_repr.adjust_storage_allocation + state + ~delta:Z.(neg @@ of_int freed_size) + >>?= fun (state, _) -> return (ctxt, state) diff --git a/src/proto_alpha/lib_protocol/tx_rollup_withdraw_storage.mli b/src/proto_alpha/lib_protocol/tx_rollup_reveal_storage.mli similarity index 68% rename from src/proto_alpha/lib_protocol/tx_rollup_withdraw_storage.mli rename to src/proto_alpha/lib_protocol/tx_rollup_reveal_storage.mli index 4bbdd0faa7ec..7fa590af211b 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_withdraw_storage.mli +++ b/src/proto_alpha/lib_protocol/tx_rollup_reveal_storage.mli @@ -25,43 +25,35 @@ (* *) (*****************************************************************************) -(** [add ctxt state tx_rollup lvl message_index withdraw_position] adds - [withdraw_position] to the list of already consumed withdrawawals for - [tx_rollup] at [lvl] for the message_result at [message_index]. - This function occupies storage space so returns a new state to - and a storage space diff reflect storage change. *) -val add : +(** [record ctxt tx_rollup lvl message_position] adds + [message_position] to the list of message with revealed + withdrawals for [tx_rollup] at [lvl]. + + In addition to an updated context, returns a new rollup state, and + the number of bytes newly allocated by this function. *) +val record : Raw_context.t -> - Tx_rollup_state_repr.t -> Tx_rollup_repr.t -> + Tx_rollup_state_repr.t -> Tx_rollup_level_repr.t -> - message_index:int -> - withdraw_position:int -> + message_position:int -> (Raw_context.t * Tx_rollup_state_repr.t * Z.t) tzresult Lwt.t -(** [mem ctxt tx_rollup lvl message_index withdraw_position] checks if - [withdraw_position] has already been consumed for [tx_rollup] at [lvl] for the - message_result at [message_index]. This function consumes gas - and so returns a new context. *) +(** [mem ctxt tx_rollup lvl message_position] checks if + [message_position] has already had its withdrawals revealed for + [tx_rollup] at [lvl]. *) val mem : Raw_context.t -> Tx_rollup_repr.t -> Tx_rollup_level_repr.t -> - message_index:int -> - withdraw_position:int -> - (bool * Raw_context.t) tzresult Lwt.t + message_position:int -> + (Raw_context.t * bool) tzresult Lwt.t -(** [remove ctxt state tx_rollup lvl] removes all withdrawal accounting for - [tx_rollup] at [lvl]. This must not be called before the - corresponding commitment is deleted. Otherwise, it would be - possible to retrieve the same withdrawal multiple times. This - function - - consumes gas and so returns a new context - - frees space from storage so returns a new state *) +(** [remove ctxt tx_rollup lvl] clean-up the reveal accounting data + from the layer-1 storage. *) val remove : Raw_context.t -> - Tx_rollup_state_repr.t -> Tx_rollup_repr.t -> + Tx_rollup_state_repr.t -> Tx_rollup_level_repr.t -> - inbox_length:int32 -> (Raw_context.t * Tx_rollup_state_repr.t) tzresult Lwt.t 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 3a7f40313915..cf9e880183da 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_state_repr.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_state_repr.ml @@ -148,7 +148,7 @@ let pp_range fmt = function *) type t = { last_removed_commitment_hashes : - (Tx_rollup_commitment_repr.Message_result_hash.t + (Tx_rollup_message_result_hash_repr.t * Tx_rollup_commitment_repr.Commitment_hash.t) option; finalized_commitments : range; @@ -275,7 +275,7 @@ let encoding : t Data_encoding.t = @@ obj2 (req "last_message_hash" - Tx_rollup_commitment_repr.Message_result_hash.encoding) + Tx_rollup_message_result_hash_repr.encoding) (req "commitment_hash" Tx_rollup_commitment_repr.Commitment_hash.encoding))) @@ -329,7 +329,7 @@ let pp fmt fprintf fmt "(message result: %a, commitment: %a)" - Tx_rollup_commitment_repr.Message_result_hash.pp + Tx_rollup_message_result_hash_repr.pp m Tx_rollup_commitment_repr.Commitment_hash.pp c)) @@ -617,7 +617,7 @@ module Internal_for_tests = struct ?burn_per_byte:Tez_repr.t -> ?inbox_ema:int -> ?last_removed_commitment_hashes: - Tx_rollup_commitment_repr.Message_result_hash.t + Tx_rollup_message_result_hash_repr.t * Tx_rollup_commitment_repr.Commitment_hash.t -> ?finalized_commitments:Tx_rollup_level_repr.t * Tx_rollup_level_repr.t -> ?unfinalized_commitments:Tx_rollup_level_repr.t * Tx_rollup_level_repr.t -> 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 84f1bebf4323..e67fd15d3515 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_state_repr.mli +++ b/src/proto_alpha/lib_protocol/tx_rollup_state_repr.mli @@ -179,7 +179,7 @@ val record_commitment_deletion : t -> Tx_rollup_level_repr.t -> Tx_rollup_commitment_repr.Commitment_hash.t -> - Tx_rollup_commitment_repr.Message_result_hash.t -> + Tx_rollup_message_result_hash_repr.t -> t tzresult (** [finalized_commitments_range state] returns the window of finalized @@ -200,7 +200,7 @@ val check_level_can_be_rejected : t -> Tx_rollup_level_repr.t -> unit tzresult hash and the last commitment hash. *) val last_removed_commitment_hashes : t -> - (Tx_rollup_commitment_repr.Message_result_hash.t + (Tx_rollup_message_result_hash_repr.t * Tx_rollup_commitment_repr.Commitment_hash.t) option @@ -232,7 +232,7 @@ module Internal_for_tests : sig ?burn_per_byte:Tez_repr.t -> ?inbox_ema:int -> ?last_removed_commitment_hashes: - Tx_rollup_commitment_repr.Message_result_hash.t + Tx_rollup_message_result_hash_repr.t * Tx_rollup_commitment_repr.Commitment_hash.t -> ?finalized_commitments:Tx_rollup_level_repr.t * Tx_rollup_level_repr.t -> ?unfinalized_commitments:Tx_rollup_level_repr.t * Tx_rollup_level_repr.t -> diff --git a/src/proto_alpha/lib_protocol/tx_rollup_ticket.ml b/src/proto_alpha/lib_protocol/tx_rollup_ticket.ml new file mode 100644 index 000000000000..066549e158d0 --- /dev/null +++ b/src/proto_alpha/lib_protocol/tx_rollup_ticket.ml @@ -0,0 +1,118 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2022 Nomadic Labs *) +(* *) +(* 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. *) +(* *) +(*****************************************************************************) + +open Alpha_context + +let parse_ticket ~consume_deserialization_gas ~ticketer ~contents ~ty ctxt = + Script.force_decode_in_context ~consume_deserialization_gas ctxt ty + >>?= fun (ty, ctxt) -> + Script.force_decode_in_context ~consume_deserialization_gas ctxt contents + >>?= fun (contents, ctxt) -> + Script_ir_translator.parse_comparable_ty ctxt (Micheline.root ty) + >>?= fun (Ex_comparable_ty contents_type, ctxt) -> + Script_ir_translator.parse_comparable_data + ctxt + contents_type + (Micheline.root contents) + >>=? fun (contents, ctxt) -> + return @@ (ctxt, Ticket_token.Ex_token {ticketer; contents_type; contents}) + +let parse_ticket_and_operation ~consume_deserialization_gas ~ticketer ~contents + ~ty ~source ~destination ~entrypoint ~amount ctxt = + Script.force_decode_in_context ~consume_deserialization_gas ctxt ty + >>?= fun (ty, ctxt) -> + Script.force_decode_in_context ~consume_deserialization_gas ctxt contents + >>?= fun (contents, ctxt) -> + Script_ir_translator.parse_comparable_ty ctxt (Micheline.root ty) + >>?= fun (Ex_comparable_ty contents_type, ctxt) -> + Script_ir_translator.parse_comparable_data + ctxt + contents_type + (Micheline.root contents) + >>=? fun (contents, ctxt) -> + let ticket_token = + Ticket_token.Ex_token {ticketer; contents_type; contents} + in + Option.value_e + ~error: + (Error_monad.trace_of_error + @@ Tx_rollup_errors.Internal_error + "Ticket quantity is negative, this can't happen because it comes \ + from a qty.") + Script_int.(is_nat @@ of_zint amount) + >>?= fun amount_node -> + Script_typed_ir.ticket_t Micheline.dummy_location contents_type + >>?= fun ticket_ty -> + let ticket = Script_typed_ir.{ticketer; contents; amount = amount_node} in + Script_ir_translator.unparse_data ctxt Optimized ticket_ty ticket + >>=? fun (parameters_expr, ctxt) -> + Gas.consume ctxt (Script.strip_locations_cost parameters_expr) + >>?= fun ctxt -> + let parameters = + Script.lazy_expr (Micheline.strip_locations parameters_expr) + in + fresh_internal_nonce ctxt >>?= fun (ctxt, nonce) -> + let op = + Script_typed_ir.Internal_operation + { + source; + nonce; + operation = + Transaction + { + transaction = + {amount = Tez.zero; parameters; destination; entrypoint}; + location = Micheline.location parameters_expr; + parameters_ty = ticket_ty; + parameters = ticket; + }; + } + in + return (ctxt, ticket_token, op) + +let make_withdraw_order ctxt tx_rollup ex_ticket claimer amount = + Ticket_balance_key.of_ex_token ctxt ~owner:(Tx_rollup tx_rollup) ex_ticket + >>=? fun (tx_rollup_ticket_hash, ctxt) -> + let withdrawal = + Tx_rollup_withdraw.{claimer; ticket_hash = tx_rollup_ticket_hash; amount} + in + return (ctxt, withdrawal) + +let transfer_ticket_with_hashes ctxt ~src_hash ~dst_hash qty = + Ticket_balance.adjust_balance ctxt src_hash ~delta:(Z.neg qty) + >>=? fun (src_storage_diff, ctxt) -> + Ticket_balance.adjust_balance ctxt dst_hash ~delta:qty + >>=? fun (dst_storage_diff, ctxt) -> + Ticket_balance.adjust_storage_space + ctxt + ~storage_diff:(Z.add src_storage_diff dst_storage_diff) + >>=? fun (diff, ctxt) -> return (ctxt, diff) + +let transfer_ticket ctxt ~src ~dst ex_token qty = + Ticket_balance_key.of_ex_token ctxt ~owner:src ex_token + >>=? fun (src_hash, ctxt) -> + Ticket_balance_key.of_ex_token ctxt ~owner:dst ex_token + >>=? fun (dst_hash, ctxt) -> + transfer_ticket_with_hashes ctxt ~src_hash ~dst_hash qty diff --git a/src/proto_alpha/lib_protocol/tx_rollup_ticket.mli b/src/proto_alpha/lib_protocol/tx_rollup_ticket.mli new file mode 100644 index 000000000000..b8f6474347e6 --- /dev/null +++ b/src/proto_alpha/lib_protocol/tx_rollup_ticket.mli @@ -0,0 +1,104 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2022 Nomadic Labs *) +(* *) +(* 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. *) +(* *) +(*****************************************************************************) + +open Alpha_context + +(** This module provides various helpers to manipulate tickets, that + are used by the Transaction Rollups. *) + +(** [parse_ticket ~consume_deserialization_gas ~ticketer ~contents ~ty + ctxt] reconstructs a ticket from individual parts submitted as + part of a layer-1 operation. *) +val parse_ticket : + consume_deserialization_gas:Script.consume_deserialization_gas -> + ticketer:Contract.t -> + contents:Script.lazy_expr -> + ty:Script.lazy_expr -> + context -> + (context * Ticket_token.ex_token, error trace) result Lwt.t + +(** Same as [parse_ticket], but in addition, build a transaction to + let [source] transfers [amount] units of said ticket to + [destination]. *) +val parse_ticket_and_operation : + consume_deserialization_gas:Script.consume_deserialization_gas -> + ticketer:Contract.t -> + contents:Script.lazy_expr -> + ty:Script.lazy_expr -> + source:Contract.t -> + destination:Destination.t -> + entrypoint:Entrypoint.t -> + amount:Z.t -> + context -> + (context * Ticket_token.ex_token * Script_typed_ir.packed_internal_operation) + tzresult + Lwt.t + +(** [make_withdraw_order ctxt tx_rollup ex_token claimer amount] + computes a withdraw order that specify that [claimer] is entitled + to get the ownership of [amount] units of [ex_token] which were + deposited to [tx_rollup]. *) +val make_withdraw_order : + context -> + Tx_rollup.t -> + Ticket_token.ex_token -> + public_key_hash -> + Tx_rollup_l2_qty.t -> + (context * Tx_rollup_withdraw.order) tzresult Lwt.t + +(** [transfer_ticket_with_hashes ctxt ~src_hash ~dst_hash qty] updates + the table of tickets moves [qty] units of a given ticket from a + source to a destination, as encoded by [src_hash] and [dst_hash]. + + Consistency between [src_hash] and [dst_hash] is the + responsibility of the caller. Whenever possible, [transfer_ticket] + should be preferred, but [transfer_ticket_with_hashes] could be + preferred to reduce gas comsumption (e.g., to reuse hashes already + computed). + + In addition to an updated context, this function returns the + number of bytes that were newly allocated for the table of + tickets. *) +val transfer_ticket_with_hashes : + context -> + src_hash:Ticket_hash.t -> + dst_hash:Ticket_hash.t -> + Z.t -> + (context * Z.t) tzresult Lwt.t + +(** [transfer_ticket ctxt ~src ~dst ex_token qty] updates the table of + tickets moves [qty] units of [ex_token] from [src] to [dst], as + encoded by [src_hash] and [dst_hash]. + + In addition to an updated context, this function returns the + number of bytes that were newly allocated for the table of + tickets. *) +val transfer_ticket : + context -> + src:Destination.t -> + dst:Destination.t -> + Ticket_token.ex_token -> + counter -> + (context * counter, error trace) result Lwt.t diff --git a/src/proto_alpha/lib_protocol/tx_rollup_withdraw_list_hash_repr.ml b/src/proto_alpha/lib_protocol/tx_rollup_withdraw_list_hash_repr.ml new file mode 100644 index 000000000000..1ea5b10c9ebc --- /dev/null +++ b/src/proto_alpha/lib_protocol/tx_rollup_withdraw_list_hash_repr.ml @@ -0,0 +1,54 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2022 Nomadic Labs *) +(* *) +(* 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. *) +(* *) +(*****************************************************************************) + +let prefix = Tx_rollup_prefixes.withdraw_list_hash.b58check_prefix + +module H = + Blake2B.Make + (Base58) + (struct + let name = "Withdraw_list_hash" + + let title = "A list of withdraw orders" + + let b58check_prefix = prefix + + let size = Some Tx_rollup_prefixes.withdraw_list_hash.hash_size + end) + +include H +include Path_encoding.Make_hex (H) + +let () = + Tx_rollup_prefixes.(check_encoding withdraw_list_hash b58check_encoding) + +let hash l = + let bytes = + Data_encoding.( + Binary.to_bytes_exn (list Tx_rollup_withdraw_repr.encoding) l) + in + H.hash_bytes [bytes] + +let empty = hash [] diff --git a/src/proto_alpha/lib_protocol/tx_rollup_withdraw_list_hash_repr.mli b/src/proto_alpha/lib_protocol/tx_rollup_withdraw_list_hash_repr.mli new file mode 100644 index 000000000000..ec6c36ed5645 --- /dev/null +++ b/src/proto_alpha/lib_protocol/tx_rollup_withdraw_list_hash_repr.mli @@ -0,0 +1,30 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2022 Nomadic Labs *) +(* *) +(* 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 S.HASH + +val hash : Tx_rollup_withdraw_repr.t list -> t + +val empty : t diff --git a/src/proto_alpha/lib_protocol/tx_rollup_withdraw_repr.ml b/src/proto_alpha/lib_protocol/tx_rollup_withdraw_repr.ml index 9b95cd4db412..78291161d39c 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_withdraw_repr.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_withdraw_repr.ml @@ -25,15 +25,15 @@ (* *) (*****************************************************************************) -type withdrawal = { +type order = { claimer : Signature.Public_key_hash.t; ticket_hash : Ticket_hash_repr.t; amount : Tx_rollup_l2_qty.t; } -type t = withdrawal +type t = order -let encoding : withdrawal Data_encoding.t = +let encoding : t Data_encoding.t = let open Data_encoding in conv (fun {claimer; ticket_hash; amount} -> (claimer, ticket_hash, amount)) @@ -42,161 +42,3 @@ let encoding : withdrawal Data_encoding.t = (req "claimer" Signature.Public_key_hash.encoding) (req "ticket_hash" Ticket_hash_repr.encoding) (req "amount" Tx_rollup_l2_qty.encoding)) - -module Withdrawal = struct - type nonrec t = t - - let to_bytes = Data_encoding.Binary.to_bytes_exn encoding -end - -module Prefix = struct - let name = "Withdrawal_list_hash" - - let title = "A merkle root hash for withdrawals" - - let b58check_prefix = Tx_rollup_prefixes.withdraw_list_hash.b58check_prefix - - let size = Some Tx_rollup_prefixes.withdraw_list_hash.hash_size -end - -module H = Blake2B.Make (Base58) (Prefix) - -module Merkle = struct - module Merkle_list = Merkle_list.Make (Withdrawal) (H) - - type tree = Merkle_list.t - - type root = Merkle_list.h - - type path = Merkle_list.path - - let nil = Merkle_list.nil - - let empty = Merkle_list.empty - - let root = Merkle_list.root - - let ( = ) = H.( = ) - - let compare = H.compare - - let root_encoding = H.encoding - - let root_of_b58check_opt = H.of_b58check_opt - - let pp_root = H.pp - - let path_encoding = Merkle_list.path_encoding - - let tree_of_messages = List.fold_left Merkle_list.snoc Merkle_list.nil - - let check_path = Merkle_list.check_path - - let path_depth = Merkle_list.path_depth - - let compute_path messages position = - let tree = tree_of_messages messages in - Merkle_list.compute_path tree position - - let merklize_list messages = - let tree = tree_of_messages messages in - root tree -end - -let maximum_path_depth ~withdraw_count_limit = - (* We assume that the Merkle_tree implemenation computes a tree in a - logarithmic size of the number of leaves. *) - let log2 n = Z.numbits (Z.of_int n) in - log2 withdraw_count_limit - -type error += Negative_withdrawal_index of int | Too_big_withdrawal_index of int - -let () = - let open Data_encoding in - register_error_kind - `Permanent - ~id:"tx_rollup_negative_withdrawal_index" - ~title:"The withdrawal index must be non-negative" - ~description:"The withdrawal index must be non-negative" - (obj1 (req "withdraw_position" int31)) - (function Negative_withdrawal_index i -> Some i | _ -> None) - (fun i -> Negative_withdrawal_index i) ; - register_error_kind - `Permanent - ~id:"tx_rollup_invalid_withdrawal_argument" - ~title:"The withdrawal index must be less than 64" - ~description:"The withdrawal index must be less than 64" - (obj1 (req "withdraw_position" int31)) - (function Too_big_withdrawal_index i -> Some i | _ -> None) - (fun i -> Too_big_withdrawal_index i) - -module Withdrawal_accounting = struct - (** Internally, the withdrawal accounting is implemented through a - list of [int64], encoding an "infinite" bitvector [bitv], so that, intuitively: - - bitv[[ofs]] = 1 <-> [ofs]th withdrawal is consumed. - - where [bitv[[ofs]]] is the [ofs % 64]th bit of the [ofs/64]th element of [bitv]. - *) - type t = int64 list - - let empty = [] - - let encoding = Data_encoding.(list int64) - - let error_when_negative ofs = - error_when Compare.Int.(ofs < 0) (Negative_withdrawal_index ofs) - - let error_when_out_of_bound ofs = - error_when_negative ofs >>? fun () -> - error_when Compare.Int.(ofs > 63) (Too_big_withdrawal_index ofs) - - (** [int64_get i ofs] returns [true] if the [ofs]th bit of [i] is - [1]. Fails if [ofs] is negative or larger than 63. *) - let int64_get (i : int64) (ofs : int) = - error_when_out_of_bound ofs >>? fun () -> - let open Int64 in - let i = shift_right_logical i ofs in - let i = logand i one in - ok @@ equal i one - - (** [int64_set i ofs] sets the [ofs]th bit of [i] to [1]. - Fails if [ofs] is negative or larger than 63. *) - let int64_set (i : int64) (ofs : int) = - error_when_out_of_bound ofs >>? fun () -> - let open Int64 in - ok @@ logor i (shift_left one ofs) - - (** [get bitv ofs] returns true if the [ofs]th bit of the - concatenation of the bitvector [bitv] is [1]. - - More precisely, it returns true if the [ofs % 64]th bit of the - [ofs/64]th element of [bitv] is [1]. - - Fails if [ofs] is negative. *) - let get (bitv : t) (ofs : int) = - error_when_negative ofs >>? fun () -> - match List.nth_opt bitv (ofs / 64) with - | Some i -> int64_get i (ofs mod 64) - | None -> ok false - - (** [set bitv ofs] sets the [ofs]th bit in the concatenation of the - bitvector [bitv] to [1]. - - More precisely, it sets the [ofs % 64]th bit of the [ofs/64]th - element of [bitv] to [1]. If [bitv] has less than - [ofs/64] elements, than [bitv] is right-padded with empty - elements ([0L]) until it reaches [ofs/64] elements. - - Fails if [ofs] is negative. *) - let rec set (bitv : t) (ofs : int) = - error_when_negative ofs >>? fun () -> - if Compare.Int.(ofs < 64) then - match bitv with - | [] -> int64_set Int64.zero ofs >|? fun i -> [i] - | i :: bitv' -> int64_set i ofs >|? fun i -> i :: bitv' - else - match bitv with - | [] -> set [] (ofs - 64) >|? fun i -> Int64.zero :: i - | i :: bitv' -> set bitv' (ofs - 64) >|? fun bitv' -> i :: bitv' -end diff --git a/src/proto_alpha/lib_protocol/tx_rollup_withdraw_repr.mli b/src/proto_alpha/lib_protocol/tx_rollup_withdraw_repr.mli index 236a99b4366e..59d3f522c44b 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_withdraw_repr.mli +++ b/src/proto_alpha/lib_protocol/tx_rollup_withdraw_repr.mli @@ -25,82 +25,16 @@ (* *) (*****************************************************************************) -(** A [withdrawal] gives right to a L1 address [claimer] to - retrieve the quantity [amount] of a ticket whose hash is [ticket_hash]. +(** A withdraw order gives right to a L1 address [claimer] to retrieve + the quantity [amount] of a ticket whose hash is [ticket_hash]. Withdrawals result from layer-2-to-layer-1 transfers, and from failed layer-2 deposits.*) -type withdrawal = { +type order = { claimer : Signature.Public_key_hash.t; ticket_hash : Ticket_hash_repr.t; amount : Tx_rollup_l2_qty.t; } -type t = withdrawal +type t = order val encoding : t Data_encoding.t - -module Merkle : sig - (** See {!Merkle_List} for the documentation of those functions. *) - - type tree - - type root - - type path - - val nil : tree - - val empty : root - - val root : tree -> root - - val ( = ) : root -> root -> bool - - val compare : root -> root -> int - - val root_encoding : root Data_encoding.t - - val root_of_b58check_opt : string -> root option - - val pp_root : Format.formatter -> root -> unit - - val path_encoding : path Data_encoding.t - - val compute_path : withdrawal list -> int -> path tzresult - - val check_path : path -> int -> withdrawal -> root -> bool tzresult - - val path_depth : path -> int - - (** [merklize_list messages] construct a merkle root by build a - tree, appending the [messages] one by one in the same order of - the list and finally computing the root. *) - val merklize_list : withdrawal list -> root -end - -(** [maximum_path_depth ~withdraw_count_limit] returns the maximum - depth of a path, depending on the maximimum number of a withdraw in - an inbox given by [message_count_limit]. *) -val maximum_path_depth : withdraw_count_limit:int -> int - -(** [Withdrawal_accounting] provides an interface for the storage to - account for which withdrawals (as identified by their index) have - been consumed. *) -module Withdrawal_accounting : sig - type t - - val encoding : t Data_encoding.t - - (** The state of withdrawal accounting where no - withdrawals have been consumed. *) - val empty : t - - (** [get l index] returns [true] if the withdrawal identified by - [index] has been been consumed (as registered through - {!Withdrawal_accounting.set}). Fails when [index] is negative. *) - val get : t -> int -> bool tzresult - - (** [set l index] registers that the withdrawal identified by - [index] has been consumed. Fails when [index] is negative. *) - val set : t -> int -> t tzresult -end diff --git a/src/proto_alpha/lib_protocol/tx_rollup_withdraw_storage.ml b/src/proto_alpha/lib_protocol/tx_rollup_withdraw_storage.ml deleted file mode 100644 index 0301603e3e8e..000000000000 --- a/src/proto_alpha/lib_protocol/tx_rollup_withdraw_storage.ml +++ /dev/null @@ -1,109 +0,0 @@ -(*****************************************************************************) -(* *) -(* 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. *) -(* *) -(*****************************************************************************) -open Tx_rollup_withdraw_repr - -let add : - Raw_context.t -> - Tx_rollup_state_repr.t -> - Tx_rollup_repr.t -> - Tx_rollup_level_repr.t -> - message_index:int -> - withdraw_position:int -> - (Raw_context.t * Tx_rollup_state_repr.t * Z.t) tzresult Lwt.t = - fun ctxt state tx_rollup commitment_lvl ~message_index ~withdraw_position -> - Storage.Tx_rollup.Consumed_withdraw.find - ((ctxt, commitment_lvl), tx_rollup) - (* TODO/TORU: https://gitlab.com/tezos/tezos/-/issues/2627 - - inbox length is in int32 replace message_index by int32 *) - (Int32.of_int message_index) - >>=? fun (ctxt, consumed_withdraw_opt) -> - Withdrawal_accounting.set - (Option.value ~default:Withdrawal_accounting.empty consumed_withdraw_opt) - withdraw_position - >>?= fun consumed_withdraw -> - Storage.Tx_rollup.Consumed_withdraw.add - ((ctxt, commitment_lvl), tx_rollup) - (Int32.of_int message_index) - consumed_withdraw - >>=? fun (ctxt, newly_alloacted_size, _is_new) -> - Tx_rollup_state_repr.adjust_storage_allocation - state - ~delta:(Z.of_int newly_alloacted_size) - >>?= fun (state, paid_storage_size_diff) -> - return (ctxt, state, paid_storage_size_diff) - -let mem : - Raw_context.t -> - Tx_rollup_repr.t -> - Tx_rollup_level_repr.t -> - message_index:int -> - withdraw_position:int -> - (bool * Raw_context.t) tzresult Lwt.t = - fun ctxt tx_rollup commitment_lvl ~message_index ~withdraw_position -> - Storage.Tx_rollup.Consumed_withdraw.find - ((ctxt, commitment_lvl), tx_rollup) - (* TODO/TORU: https://gitlab.com/tezos/tezos/-/issues/2627 - - inbox length is in int32 replace message_index by int32 *) - (Int32.of_int message_index) - >>=? fun (ctxt, consumed_withdraw_opt) -> - Option.map_e - (fun s -> Withdrawal_accounting.get s withdraw_position) - consumed_withdraw_opt - >>?= fun consumed_withdraw_opt -> - let already_consumed = Option.value ~default:false consumed_withdraw_opt in - return (already_consumed, ctxt) - -let remove : - Raw_context.t -> - Tx_rollup_state_repr.t -> - Tx_rollup_repr.t -> - Tx_rollup_level_repr.t -> - inbox_length:int32 -> - (Raw_context.t * Tx_rollup_state_repr.t) tzresult Lwt.t = - fun ctxt state rollup level ~inbox_length -> - let rec remove_withdrawal_accounting ctxt state i len ~acc_freed_size = - if Compare.Int32.(i < len) then - Storage.Tx_rollup.Consumed_withdraw.remove ((ctxt, level), rollup) i - >>=? fun (ctxt, freed_size, _) -> - let acc_freed_size = acc_freed_size + freed_size in - remove_withdrawal_accounting ctxt state (Int32.succ i) len ~acc_freed_size - else return (ctxt, state, acc_freed_size) - in - (* for each message in the inbox, the storage contains one set of - executed withdrawals that should be removed *) - remove_withdrawal_accounting ctxt state 0l inbox_length ~acc_freed_size:0 - >>=? fun (ctxt, state, freed_size) -> - (* while we free storage space and adjust storage - allocation, the returned [_paid_storage_size_diff] - is always 0. Therefore, we neglect - [_paid_storage_size_diff]. *) - Tx_rollup_state_repr.adjust_storage_allocation - state - ~delta:(Z.of_int freed_size |> Z.neg) - >>?= fun (state, _paid_storage_size_diff) -> return (ctxt, state) -- GitLab From 734efe874baeeb198ad9a01d6cb68e103f8fa1c7 Mon Sep 17 00:00:00 2001 From: Thomas Letan Date: Fri, 25 Mar 2022 03:31:15 +0100 Subject: [PATCH 07/20] Proto,tx_rollup: Merklise commitments --- .../lib_client/client_proto_context.ml | 56 ++- .../lib_client/client_proto_context.mli | 7 +- .../lib_client/operation_result.ml | 4 +- .../client_proto_context_commands.ml | 29 +- src/proto_alpha/lib_protocol/alpha_context.ml | 2 +- .../lib_protocol/alpha_context.mli | 94 +++-- src/proto_alpha/lib_protocol/apply.ml | 110 +++--- src/proto_alpha/lib_protocol/merkle_list.ml | 4 + src/proto_alpha/lib_protocol/merkle_list.mli | 4 + .../lib_protocol/operation_repr.ml | 68 +++- .../lib_protocol/operation_repr.mli | 6 +- .../lib_protocol/test/helpers/op.ml | 25 +- .../lib_protocol/test/helpers/op.mli | 6 +- .../integration/operations/test_tx_rollup.ml | 339 ++++++++++++++---- .../lib_protocol/tx_rollup_commitment_repr.ml | 163 ++++++--- .../tx_rollup_commitment_repr.mli | 51 ++- .../tx_rollup_commitment_storage.ml | 158 ++++---- .../tx_rollup_commitment_storage.mli | 34 +- .../lib_protocol/tx_rollup_errors_repr.ml | 113 +++--- .../lib_protocol/tx_rollup_inbox_repr.ml | 6 - .../lib_protocol/tx_rollup_inbox_repr.mli | 5 - .../lib_protocol/tx_rollup_inbox_storage.ml | 13 +- .../lib_protocol/tx_rollup_prefixes.ml | 8 + .../lib_protocol/tx_rollup_prefixes.mli | 3 + .../lib_protocol/tx_rollup_state_repr.ml | 20 +- .../lib_protocol/tx_rollup_state_repr.mli | 20 +- 26 files changed, 921 insertions(+), 427 deletions(-) diff --git a/src/proto_alpha/lib_client/client_proto_context.ml b/src/proto_alpha/lib_client/client_proto_context.ml index 1522b351d82b..97b98a7f8732 100644 --- a/src/proto_alpha/lib_client/client_proto_context.ml +++ b/src/proto_alpha/lib_client/client_proto_context.ml @@ -880,7 +880,7 @@ let submit_tx_rollup_commitment (cctxt : #full) ~chain ~block ?confirmations | Some content -> return content | None -> failwith "%s is not a valid inbox merkle root" inbox_merkle_root) >>=? fun inbox_merkle_root -> - let commitment : Tx_rollup_commitment.t = + let commitment : Tx_rollup_commitment.Full.t = {level; messages; predecessor; inbox_merkle_root} in let contents : @@ -990,28 +990,45 @@ let submit_tx_rollup_remove_commitment (cctxt : #full) ~chain ~block 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 ~message_path ~context_hash ~withdrawals_merkle_root - ~proof () = + ~message_position ~message_path ~message_result_hash ~message_result_path + ~previous_context_hash ~previous_withdraw_list_hash + ~previous_message_result_path ~proof () = (match Data_encoding.Json.from_string message with | Ok json -> return json | Error err -> failwith "Message is not a valid JSON-encoded message: %s" err) >>=? fun json -> let message = Data_encoding.Json.(destruct Tx_rollup_message.encoding json) in Environment.wrap_tzresult (Tx_rollup_level.of_int32 level) >>?= fun level -> - (match Context_hash.of_b58check_opt context_hash with + (match Context_hash.of_b58check_opt previous_context_hash with | Some hash -> return hash | None -> - failwith "%s is not a valid notation for a context hash" context_hash) - >>=? fun context_hash -> + failwith + "%s is not a valid notation for a context hash" + previous_context_hash) + >>=? fun previous_context_hash -> (match - Tx_rollup_withdraw_list_hash.of_b58check_opt withdrawals_merkle_root + Tx_rollup_withdraw_list_hash.of_b58check_opt previous_withdraw_list_hash with | Some hash -> return hash | None -> failwith "%s is not a valid notation for a withdraw list hash" - withdrawals_merkle_root) - >>=? fun withdraw_list_hash -> + previous_withdraw_list_hash) + >>=? fun previous_withdraw_list_hash -> + let previous_message_result = + Tx_rollup_message_result. + { + context_hash = previous_context_hash; + withdraw_list_hash = previous_withdraw_list_hash; + } + in + (match Tx_rollup_message_result_hash.of_b58check_opt message_result_hash with + | Some x -> return x + | _ -> + failwith + "%s is not a valid notation for a withdraw list hash" + message_result_hash) + >>=? fun message_result_hash -> (match Data_encoding.Json.from_string message_path with | Ok json -> Data_encoding.Json.destruct Tx_rollup_inbox.Merkle.path_encoding json @@ -1019,6 +1036,22 @@ let submit_tx_rollup_rejection (cctxt : #full) ~chain ~block ?confirmations | Error err -> failwith "Message path is not a valid JSON-encoded message: %s" err) >>=? fun message_path -> + (match Data_encoding.Json.from_string message_result_path with + | Ok json -> + Data_encoding.Json.destruct Tx_rollup_commitment.Merkle.path_encoding json + |> return + | Error err -> + failwith "Message result path is not a valid JSON-encoded message: %s" err) + >>=? fun message_result_path -> + (match Data_encoding.Json.from_string previous_message_result_path with + | Ok json -> + Data_encoding.Json.destruct Tx_rollup_commitment.Merkle.path_encoding json + |> return + | Error err -> + failwith + "Previous message result path is not a valid JSON-encoded message: %s" + err) + >>=? fun previous_message_result_path -> (match Data_encoding.Json.from_string proof with | Ok json -> Data_encoding.Json.destruct Tx_rollup_l2_proof.encoding json |> return @@ -1038,7 +1071,10 @@ let submit_tx_rollup_rejection (cctxt : #full) ~chain ~block ?confirmations message; message_position; message_path; - previous_message_result = {context_hash; withdraw_list_hash}; + message_result_hash; + message_result_path; + previous_message_result_path; + previous_message_result; proof; })) in diff --git a/src/proto_alpha/lib_client/client_proto_context.mli b/src/proto_alpha/lib_client/client_proto_context.mli index 59b871c3d9ef..559a088dc426 100644 --- a/src/proto_alpha/lib_client/client_proto_context.mli +++ b/src/proto_alpha/lib_client/client_proto_context.mli @@ -566,8 +566,11 @@ val submit_tx_rollup_rejection : message:string -> message_position:int -> message_path:string -> - context_hash:string -> - withdrawals_merkle_root:string -> + message_result_hash:string -> + message_result_path:string -> + previous_context_hash:string -> + previous_withdraw_list_hash:string -> + previous_message_result_path:string -> proof:string -> unit -> (Operation_hash.t diff --git a/src/proto_alpha/lib_client/operation_result.ml b/src/proto_alpha/lib_client/operation_result.ml index 5c8251a2c3f7..6cdf3a753a37 100644 --- a/src/proto_alpha/lib_client/operation_result.ml +++ b/src/proto_alpha/lib_client/operation_result.ml @@ -194,7 +194,7 @@ let pp_manager_operation_content (type kind) source internal pp_result ppf else "Tx rollup commitment") Tx_rollup.pp tx_rollup - Tx_rollup_commitment.pp + Tx_rollup_commitment.Full.pp commitment Contract.pp source @@ -224,7 +224,7 @@ let pp_manager_operation_content (type kind) source internal pp_result ppf source pp_result result - | Tx_rollup_remove_commitment {tx_rollup} -> + | Tx_rollup_remove_commitment {tx_rollup; _} -> Format.fprintf ppf "@[%s:%a @,From: %a%a@]" 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 f16883d8b9ce..3e8e4f0fc9b9 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 @@ -2610,6 +2610,16 @@ let commands_rw () = ~name:"message_path" ~desc:"merkle path of the message being rejected in the inbox" string_parameter + @@ prefixes ["to"; "reject"] + @@ Clic.param + ~name:"message_result_hash" + ~desc:"message result hash being rejected" + Client_proto_args.string_parameter + @@ prefixes ["with"; "path"] + @@ Clic.param + ~name:"message_result_path" + ~desc:"merkle path of message result hash being rejected" + Client_proto_args.string_parameter @@ prefix "with" @@ prefix "proof" @@ tx_rollup_proof_param @@ prefixes ["with"; "agreed"; "context"; "hash"] @@ Clic.param @@ -2621,6 +2631,11 @@ let commands_rw () = ~name:"withdrawals_merkle_root" ~desc:"the hash of the merkelised withdraw list" Client_proto_args.string_parameter + @@ prefixes ["with"; "path"] + @@ Clic.param + ~name:"message_result_path" + ~desc:"merkle path of the message result being rejected in the inbox" + string_parameter @@ prefix "to" @@ tx_rollup_param @@ prefix "from" @@ ContractAlias.destination_param ~name:"src" @@ -2642,9 +2657,12 @@ let commands_rw () = message message_position message_path + message_result_hash + message_result_path proof - context_hash - withdrawals_merkle_root + previous_context_hash + previous_withdraw_list_hash + previous_message_result_path tx_rollup (_, source) cctxt -> @@ -2685,9 +2703,12 @@ let commands_rw () = ~message ~message_position ~message_path + ~message_result_hash + ~message_result_path ~proof - ~context_hash - ~withdrawals_merkle_root + ~previous_context_hash + ~previous_withdraw_list_hash + ~previous_message_result_path () >>=? fun _res -> return_unit); command diff --git a/src/proto_alpha/lib_protocol/alpha_context.ml b/src/proto_alpha/lib_protocol/alpha_context.ml index ba04a81950c0..28961fe72509 100644 --- a/src/proto_alpha/lib_protocol/alpha_context.ml +++ b/src/proto_alpha/lib_protocol/alpha_context.ml @@ -238,7 +238,7 @@ module Contract = struct end module Tx_rollup_level = Tx_rollup_level_repr -module Tx_rollup_commitment_hash = Tx_rollup_commitment_repr.Commitment_hash +module Tx_rollup_commitment_hash = Tx_rollup_commitment_repr.Hash module Tx_rollup_message_result_hash = Tx_rollup_message_result_hash_repr module Tx_rollup = struct diff --git a/src/proto_alpha/lib_protocol/alpha_context.mli b/src/proto_alpha/lib_protocol/alpha_context.mli index 1b217f057bcc..5c5704a14b1e 100644 --- a/src/proto_alpha/lib_protocol/alpha_context.mli +++ b/src/proto_alpha/lib_protocol/alpha_context.mli @@ -1907,24 +1907,43 @@ module Tx_rollup_inbox : sig Tx_rollup_message.t -> Merkle.path -> context tzresult Lwt.t - - val maximum_path_depth : message_count_limit:int -> int end (** This simply re-exports [Tx_rollup_commitment_repr] *) module Tx_rollup_commitment : sig - type t = { + module Merkle_hash : S.HASH + + module Merkle : + Merkle_list.T + with type elt = Tx_rollup_message_result_hash.t + and type h = Merkle_hash.t + + type 'a template = { level : Tx_rollup_level.t; - messages : Tx_rollup_message_result_hash.t list; + messages : 'a; predecessor : Tx_rollup_commitment_hash.t option; inbox_merkle_root : Tx_rollup_inbox.Merkle.root; } - include Compare.S with type t := t + module Compact : sig + type excerpt = { + count : int; + root : Merkle.h; + last_result_message_hash : Tx_rollup_message_result_hash.t; + } + + type t = excerpt template + + val pp : Format.formatter -> t -> unit + + val encoding : t Data_encoding.t + + val hash : t -> Tx_rollup_commitment_hash.t + end module Submitted_commitment : sig type nonrec t = { - commitment : t; + commitment : Compact.t; commitment_hash : Tx_rollup_commitment_hash.t; committer : Signature.Public_key_hash.t; submitted_at : Raw_level.t; @@ -1934,26 +1953,32 @@ module Tx_rollup_commitment : sig val encoding : t Data_encoding.t end - val pp : Format.formatter -> t -> unit + module Full : sig + type t = Tx_rollup_message_result_hash.t list template - val encoding : t Data_encoding.t + val encoding : t Data_encoding.t + + val pp : Format.formatter -> t -> unit - val hash : t -> Tx_rollup_commitment_hash.t + val compact : t -> Compact.t + end val check_message_result : - t -> Tx_rollup_message_result.t -> message_index:int -> bool + Compact.t -> + [ `Hash of Tx_rollup_message_result_hash.t + | `Result of Tx_rollup_message_result.t ] -> + path:Merkle.path -> + index:int -> + unit tzresult val add_commitment : context -> Tx_rollup.t -> Tx_rollup_state.t -> Signature.public_key_hash -> - t -> + Full.t -> (context * Tx_rollup_state.t * Z.t) tzresult Lwt.t - val check_commitment_level : - Raw_level.t -> Tx_rollup_state.t -> t -> unit tzresult - val find : context -> Tx_rollup.t -> @@ -1968,17 +1993,17 @@ module Tx_rollup_commitment : sig Tx_rollup_level.t -> (context * Submitted_commitment.t) tzresult Lwt.t - val get_before_and_after_results : + val check_agreed_and_disputed_results : context -> Tx_rollup.t -> - Submitted_commitment.t -> - message_position:int -> Tx_rollup_state.t -> - (context - * Tx_rollup_message_result_hash.t - * Tx_rollup_message_result_hash.t) - tzresult - Lwt.t + Submitted_commitment.t -> + agreed_result:Tx_rollup_message_result.t -> + agreed_result_path:Merkle.path -> + disputed_result:Tx_rollup_message_result_hash.t -> + disputed_position:int -> + disputed_result_path:Merkle.path -> + context tzresult Lwt.t val get_finalized : context -> @@ -2066,8 +2091,11 @@ module Tx_rollup_errors : sig position : int; length : int; } - | Wrong_message_path_depth of {provided : int; limit : int} - | Wrong_withdraw_path_depth of {provided : int; limit : int} + | Wrong_path_depth of { + kind : [`Inbox | `Commitment]; + provided : int; + limit : int; + } | Wrong_message_path of {expected : Tx_rollup_inbox.Merkle.root} | No_finalized_commitment_for_level of { level : Tx_rollup_level.t; @@ -2081,10 +2109,11 @@ module Tx_rollup_errors : sig provided : Tx_rollup_level.t; accepted_range : (Tx_rollup_level.t * Tx_rollup_level.t) option; } - | Wrong_rejection_hashes of { - provided : Tx_rollup_message_result.t; - computed : Tx_rollup_message_result_hash.t; - expected : Tx_rollup_message_result_hash.t; + | Wrong_rejection_hash of { + provided : Tx_rollup_message_result_hash.t; + expected : + [ `Valid_path of Tx_rollup_commitment.Merkle.h * int + | `Hash of Tx_rollup_message_result_hash.t ]; } | Wrong_deposit_parameters | Proof_failed_to_reject @@ -2094,6 +2123,9 @@ module Tx_rollup_errors : sig provided : Context_hash.t; } | No_withdrawals_to_dispatch + + val check_path_depth : + [`Inbox | `Commitment] -> int -> count_limit:int -> unit tzresult end module Bond_id : sig @@ -2936,7 +2968,7 @@ and _ manager_operation = -> Kind.tx_rollup_submit_batch manager_operation | Tx_rollup_commit : { tx_rollup : Tx_rollup.t; - commitment : Tx_rollup_commitment.t; + commitment : Tx_rollup_commitment.Full.t; } -> Kind.tx_rollup_commit manager_operation | Tx_rollup_return_bond : { @@ -2957,7 +2989,10 @@ and _ manager_operation = message : Tx_rollup_message.t; message_position : int; message_path : Tx_rollup_inbox.Merkle.path; + message_result_hash : Tx_rollup_message_result_hash.t; + message_result_path : Tx_rollup_commitment.Merkle.path; previous_message_result : Tx_rollup_message_result.t; + previous_message_result_path : Tx_rollup_commitment.Merkle.path; proof : Tx_rollup_l2_proof.t; } -> Kind.tx_rollup_rejection manager_operation @@ -2966,6 +3001,7 @@ and _ manager_operation = level : Tx_rollup_level.t; context_hash : Context_hash.t; message_index : int; + message_result_path : Tx_rollup_commitment.Merkle.path; tickets_info : Tx_rollup_reveal.t list; } -> Kind.tx_rollup_dispatch_tickets manager_operation diff --git a/src/proto_alpha/lib_protocol/apply.ml b/src/proto_alpha/lib_protocol/apply.ml index d4da48b36fa0..f1c545d9dffe 100644 --- a/src/proto_alpha/lib_protocol/apply.ml +++ b/src/proto_alpha/lib_protocol/apply.ml @@ -1282,7 +1282,14 @@ let apply_external_manager_operation_content : | Transaction {destination = Tx_rollup _; _} -> fail Tx_rollup_non_internal_transaction | Tx_rollup_dispatch_tickets - {tx_rollup; level; context_hash; message_index; tickets_info} -> + { + tx_rollup; + level; + context_hash; + message_index; + message_result_path; + tickets_info; + } -> Tx_rollup_state.get ctxt tx_rollup >>=? fun (ctxt, state) -> Tx_rollup_commitment.get_finalized ctxt tx_rollup state level >>=? fun (ctxt, commitment) -> @@ -1319,12 +1326,11 @@ let apply_external_manager_operation_content : let withdraw_list_hash = Tx_rollup_withdraw_list_hash.hash @@ List.rev rev_withdraw_list in - error_unless - (Tx_rollup_commitment.check_message_result - commitment.commitment - {context_hash; withdraw_list_hash} - ~message_index) - Tx_rollup_errors.Withdrawals_invalid_path + Tx_rollup_commitment.check_message_result + commitment.commitment + (`Result {context_hash; withdraw_list_hash}) + ~path:message_result_path + ~index:message_index >>?= fun () -> Tx_rollup_reveal.record ctxt @@ -1611,36 +1617,30 @@ let apply_external_manager_operation_content : tx_rollup; level; message; - previous_message_result; message_position; message_path; + message_result_hash; + message_result_path; + previous_message_result; + previous_message_result_path; } -> Tx_rollup_state.get ctxt tx_rollup >>=? fun (ctxt, state) -> (* Check [level] *) Tx_rollup_state.check_level_can_be_rejected state level >>?= fun () -> - (* Check [previous_message_result] *) Tx_rollup_commitment.get ctxt tx_rollup state level >>=? fun (ctxt, commitment) -> - Tx_rollup_commitment.get_before_and_after_results - ctxt - tx_rollup - commitment - state - ~message_position - >>=? fun (ctxt, agreed_hash, rejected) -> - let computed = - Tx_rollup_message_result_hash.hash previous_message_result - in - fail_unless - Tx_rollup_message_result_hash.(agreed_hash = computed) - (Tx_rollup_errors.Wrong_rejection_hashes + (* Check [message] *) + error_when + Compare.Int.( + message_position < 0 + || commitment.commitment.messages.count <= message_position) + (Tx_rollup_errors.Wrong_message_position { - expected = agreed_hash; - provided = previous_message_result; - computed; + level = commitment.commitment.level; + position = message_position; + length = commitment.commitment.messages.count; }) - (* Check [message] *) - >>=? fun () -> + >>?= fun () -> Tx_rollup_inbox.check_message_hash ctxt level @@ -1649,6 +1649,18 @@ let apply_external_manager_operation_content : message message_path >>=? fun ctxt -> + (* Check message result paths *) + Tx_rollup_commitment.check_agreed_and_disputed_results + ctxt + tx_rollup + state + commitment + ~agreed_result:previous_message_result + ~agreed_result_path:previous_message_result_path + ~disputed_result:message_result_hash + ~disputed_result_path:message_result_path + ~disputed_position:message_position + >>=? fun ctxt -> (* Check [proof] *) let parameters = Tx_rollup_l2_apply. @@ -1662,7 +1674,7 @@ let apply_external_manager_operation_content : message proof ~agreed:previous_message_result - ~rejected + ~rejected:message_result_hash ~max_proof_size: (Alpha_context.Constants.tx_rollup_rejection_max_proof_size ctxt) >>=? fun () -> @@ -1867,11 +1879,21 @@ let precheck_manager_contents (type kind) ctxt (op : kind Kind.manager contents) | Tx_rollup_finalize_commitment _ | Tx_rollup_remove_commitment _ | Transfer_ticket _ -> assert_tx_rollup_feature_enabled ctxt >>=? fun () -> return ctxt - | Tx_rollup_dispatch_tickets {tickets_info; _} -> + | Tx_rollup_dispatch_tickets {tickets_info; message_result_path; _} -> assert_tx_rollup_feature_enabled ctxt >>=? fun () -> - let Constants.{tx_rollup_max_withdrawals_per_batch; _} = + let Constants. + { + tx_rollup_max_messages_per_inbox; + tx_rollup_max_withdrawals_per_batch; + _; + } = Constants.parametric ctxt in + Tx_rollup_errors.check_path_depth + `Commitment + (Tx_rollup_commitment.Merkle.path_depth message_result_path) + ~count_limit:tx_rollup_max_messages_per_inbox + >>?= fun () -> error_when Compare.List_length_with.(tickets_info = 0) Tx_rollup_errors.No_withdrawals_to_dispatch @@ -1881,21 +1903,27 @@ let precheck_manager_contents (type kind) ctxt (op : kind Kind.manager contents) tickets_info > tx_rollup_max_withdrawals_per_batch) Tx_rollup_errors.Too_many_withdrawals >>?= fun () -> return ctxt - | Tx_rollup_rejection {message_path; _} -> + | Tx_rollup_rejection + {message_path; message_result_path; previous_message_result_path; _} -> assert_tx_rollup_feature_enabled ctxt >>=? fun () -> let Constants.{tx_rollup_max_messages_per_inbox; _} = Constants.parametric ctxt in - let path_size = Tx_rollup_inbox.Merkle.path_depth message_path in - let maximum_path_size = - Tx_rollup_inbox.maximum_path_depth - ~message_count_limit:tx_rollup_max_messages_per_inbox - in - if Compare.Int.(path_size > maximum_path_size) then - fail - (Tx_rollup_errors.Wrong_message_path_depth - {provided = path_size; limit = maximum_path_size}) - else return ctxt + Tx_rollup_errors.check_path_depth + `Inbox + (Tx_rollup_inbox.Merkle.path_depth message_path) + ~count_limit:tx_rollup_max_messages_per_inbox + >>?= fun () -> + Tx_rollup_errors.check_path_depth + `Inbox + (Tx_rollup_commitment.Merkle.path_depth message_result_path) + ~count_limit:tx_rollup_max_messages_per_inbox + >>?= fun () -> + Tx_rollup_errors.check_path_depth + `Inbox + (Tx_rollup_commitment.Merkle.path_depth previous_message_result_path) + ~count_limit:tx_rollup_max_messages_per_inbox + >>?= fun () -> return ctxt | Sc_rollup_originate _ | Sc_rollup_add_messages _ | Sc_rollup_cement _ | Sc_rollup_publish _ -> assert_sc_rollup_feature_enabled ctxt >|=? fun () -> ctxt) diff --git a/src/proto_alpha/lib_protocol/merkle_list.ml b/src/proto_alpha/lib_protocol/merkle_list.ml index c373f3e6c142..48c5e3c22f03 100644 --- a/src/proto_alpha/lib_protocol/merkle_list.ml +++ b/src/proto_alpha/lib_protocol/merkle_list.ml @@ -45,6 +45,8 @@ module type T = sig type path + val dummy_path : path + val pp_path : Format.formatter -> path -> unit val nil : t @@ -125,6 +127,8 @@ end) type path = h list + let dummy_path = [] + let pp_path ppf = Format.fprintf ppf diff --git a/src/proto_alpha/lib_protocol/merkle_list.mli b/src/proto_alpha/lib_protocol/merkle_list.mli index b51933f4161c..39e000704bf0 100644 --- a/src/proto_alpha/lib_protocol/merkle_list.mli +++ b/src/proto_alpha/lib_protocol/merkle_list.mli @@ -39,6 +39,10 @@ module type T = sig of an element in the Merkle list. *) type path + (** A dummy path that can be used as a placeholder when no path is + actually required. *) + val dummy_path : path + val pp_path : Format.formatter -> path -> unit (** The empty Merkle list *) diff --git a/src/proto_alpha/lib_protocol/operation_repr.ml b/src/proto_alpha/lib_protocol/operation_repr.ml index f2a07443e88f..dec9abba76d0 100644 --- a/src/proto_alpha/lib_protocol/operation_repr.ml +++ b/src/proto_alpha/lib_protocol/operation_repr.ml @@ -307,7 +307,7 @@ and _ manager_operation = -> Kind.tx_rollup_submit_batch manager_operation | Tx_rollup_commit : { tx_rollup : Tx_rollup_repr.t; - commitment : Tx_rollup_commitment_repr.t; + commitment : Tx_rollup_commitment_repr.Full.t; } -> Kind.tx_rollup_commit manager_operation | Tx_rollup_return_bond : { @@ -328,7 +328,10 @@ and _ manager_operation = message : Tx_rollup_message_repr.t; message_position : int; message_path : Tx_rollup_inbox_repr.Merkle.path; + message_result_hash : Tx_rollup_message_result_hash_repr.t; + message_result_path : Tx_rollup_commitment_repr.Merkle.path; previous_message_result : Tx_rollup_message_result_repr.t; + previous_message_result_path : Tx_rollup_commitment_repr.Merkle.path; proof : Tx_rollup_l2_proof.t; } -> Kind.tx_rollup_rejection manager_operation @@ -337,6 +340,7 @@ and _ manager_operation = level : Tx_rollup_level_repr.t; context_hash : Context_hash.t; message_index : int; + message_result_path : Tx_rollup_commitment_repr.Merkle.path; tickets_info : Tx_rollup_reveal_repr.t list; } -> Kind.tx_rollup_dispatch_tickets manager_operation @@ -664,7 +668,7 @@ module Encoding = struct encoding = obj2 (req "rollup" Tx_rollup_repr.encoding) - (req "commitment" Tx_rollup_commitment_repr.encoding); + (req "commitment" Tx_rollup_commitment_repr.Full.encoding); select = (function | Manager (Tx_rollup_commit _ as op) -> Some op | _ -> None); @@ -725,15 +729,24 @@ module Encoding = struct tag = tx_rollup_operation_rejection_tag; name = "tx_rollup_rejection"; encoding = - obj7 + obj10 (req "rollup" Tx_rollup_repr.encoding) (req "level" Tx_rollup_level_repr.encoding) (req "message" Tx_rollup_message_repr.encoding) (req "message_position" n) (req "message_path" Tx_rollup_inbox_repr.Merkle.path_encoding) + (req + "message_result_hash" + Tx_rollup_message_result_hash_repr.encoding) + (req + "message_result_path" + Tx_rollup_commitment_repr.Merkle.path_encoding) (req "previous_message_result" Tx_rollup_message_result_repr.encoding) + (req + "previous_message_result_path" + Tx_rollup_commitment_repr.Merkle.path_encoding) (req "proof" Tx_rollup_l2_proof.encoding); select = (function @@ -747,7 +760,10 @@ module Encoding = struct message; message_position; message_path; + message_result_hash; + message_result_path; previous_message_result; + previous_message_result_path; proof; } -> ( tx_rollup, @@ -755,7 +771,10 @@ module Encoding = struct message, Z.of_int message_position, message_path, + message_result_hash, + message_result_path, previous_message_result, + previous_message_result_path, proof )); inj = (fun ( tx_rollup, @@ -763,7 +782,10 @@ module Encoding = struct message, message_position, message_path, + message_result_hash, + message_result_path, previous_message_result, + previous_message_result_path, proof ) -> Tx_rollup_rejection { @@ -772,7 +794,10 @@ module Encoding = struct message; message_position = Z.to_int message_position; message_path; + message_result_hash; + message_result_path; previous_message_result; + previous_message_result_path; proof; }); } @@ -783,11 +808,14 @@ module Encoding = struct tag = tx_rollup_operation_dispatch_tickets_tag; name = "tx_rollup_dispatch_tickets"; encoding = - obj5 + obj6 (req "tx_rollup" Tx_rollup_repr.encoding) (req "level" Tx_rollup_level_repr.encoding) (req "context_hash" Context_hash.encoding) (req "message_index" int31) + (req + "message_result_path" + Tx_rollup_commitment_repr.Merkle.path_encoding) (req "tickets_info" (Data_encoding.list Tx_rollup_reveal_repr.encoding)); @@ -798,12 +826,36 @@ module Encoding = struct proj = (function | Tx_rollup_dispatch_tickets - {tx_rollup; level; context_hash; message_index; tickets_info} -> - (tx_rollup, level, context_hash, message_index, tickets_info)); + { + tx_rollup; + level; + context_hash; + message_index; + message_result_path; + tickets_info; + } -> + ( tx_rollup, + level, + context_hash, + message_index, + message_result_path, + tickets_info )); inj = - (fun (tx_rollup, level, context_hash, message_index, tickets_info) -> + (fun ( tx_rollup, + level, + context_hash, + message_index, + message_result_path, + tickets_info ) -> Tx_rollup_dispatch_tickets - {tx_rollup; level; context_hash; message_index; tickets_info}); + { + tx_rollup; + level; + context_hash; + message_index; + message_result_path; + tickets_info; + }); } let[@coq_axiom_with_reason "gadt"] transfer_ticket_case = diff --git a/src/proto_alpha/lib_protocol/operation_repr.mli b/src/proto_alpha/lib_protocol/operation_repr.mli index 6aee0ae55895..de7e706f444b 100644 --- a/src/proto_alpha/lib_protocol/operation_repr.mli +++ b/src/proto_alpha/lib_protocol/operation_repr.mli @@ -353,7 +353,7 @@ and _ manager_operation = -> Kind.tx_rollup_submit_batch manager_operation | Tx_rollup_commit : { tx_rollup : Tx_rollup_repr.t; - commitment : Tx_rollup_commitment_repr.t; + commitment : Tx_rollup_commitment_repr.Full.t; } -> Kind.tx_rollup_commit manager_operation | Tx_rollup_return_bond : { @@ -374,7 +374,10 @@ and _ manager_operation = message : Tx_rollup_message_repr.t; message_position : int; message_path : Tx_rollup_inbox_repr.Merkle.path; + message_result_hash : Tx_rollup_message_result_hash_repr.t; + message_result_path : Tx_rollup_commitment_repr.Merkle.path; previous_message_result : Tx_rollup_message_result_repr.t; + previous_message_result_path : Tx_rollup_commitment_repr.Merkle.path; proof : Tx_rollup_l2_proof.t; } -> Kind.tx_rollup_rejection manager_operation @@ -388,6 +391,7 @@ and _ manager_operation = inbox from where this withdrawal was enabled. *) message_index : int; (** Index of the message in the inbox at [level] where this withdrawal was enabled. *) + message_result_path : Tx_rollup_commitment_repr.Merkle.path; tickets_info : Tx_rollup_reveal_repr.t list; } -> Kind.tx_rollup_dispatch_tickets manager_operation diff --git a/src/proto_alpha/lib_protocol/test/helpers/op.ml b/src/proto_alpha/lib_protocol/test/helpers/op.ml index 4606ec959a07..4e3368c7d3ce 100644 --- a/src/proto_alpha/lib_protocol/test/helpers/op.ml +++ b/src/proto_alpha/lib_protocol/test/helpers/op.ml @@ -540,7 +540,7 @@ let tx_rollup_submit_batch ?counter ?fee ?burn_limit ?gas_limit ?storage_limit let tx_rollup_commit ?counter ?fee ?gas_limit ?storage_limit ctxt (source : Contract.t) (tx_rollup : Tx_rollup.t) - (commitment : Tx_rollup_commitment.t) = + (commitment : Tx_rollup_commitment.Full.t) = manager_operation ?counter ?fee @@ -596,8 +596,8 @@ let tx_rollup_remove_commitment ?counter ?fee ?gas_limit ?storage_limit ctxt sign account.sk ctxt to_sign_op let tx_rollup_dispatch_tickets ?counter ?fee ?gas_limit ?storage_limit ctxt - ~(source : Contract.t) ~message_index tx_rollup level context_hash - tickets_info = + ~(source : Contract.t) ~message_index ~message_result_path tx_rollup level + context_hash tickets_info = manager_operation ?counter ?fee @@ -606,7 +606,14 @@ let tx_rollup_dispatch_tickets ?counter ?fee ?gas_limit ?storage_limit ctxt ~source ctxt (Tx_rollup_dispatch_tickets - {tx_rollup; level; context_hash; message_index; tickets_info}) + { + tx_rollup; + level; + context_hash; + message_index; + tickets_info; + message_result_path; + }) >>=? fun to_sign_op -> Context.Contract.manager ctxt source >|=? fun account -> sign account.sk ctxt to_sign_op @@ -629,9 +636,10 @@ let transfer_ticket ?counter ?fee ?gas_limit ?storage_limit ctxt let tx_rollup_reject ?counter ?fee ?gas_limit ?storage_limit ctxt (source : Contract.t) (tx_rollup : Tx_rollup.t) (level : Tx_rollup_level.t) (message : Tx_rollup_message.t) ~(message_position : int) - ~(message_path : Tx_rollup_inbox.Merkle.path) - ~(proof : Tx_rollup_l2_proof.t) - ~(previous_message_result : Tx_rollup_message_result.t) = + ~(message_path : Tx_rollup_inbox.Merkle.path) ~message_result_hash + ~message_result_path ~(proof : Tx_rollup_l2_proof.t) + ~(previous_message_result : Tx_rollup_message_result.t) + ~previous_message_result_path = manager_operation ?counter ?fee @@ -646,8 +654,11 @@ let tx_rollup_reject ?counter ?fee ?gas_limit ?storage_limit ctxt message; message_position; message_path; + message_result_hash; proof; previous_message_result; + previous_message_result_path; + message_result_path; }) >>=? fun to_sign_op -> Context.Contract.manager ctxt source >|=? fun account -> diff --git a/src/proto_alpha/lib_protocol/test/helpers/op.mli b/src/proto_alpha/lib_protocol/test/helpers/op.mli index 75a7df5d9159..ef2354bd5a1b 100644 --- a/src/proto_alpha/lib_protocol/test/helpers/op.mli +++ b/src/proto_alpha/lib_protocol/test/helpers/op.mli @@ -247,7 +247,7 @@ val tx_rollup_commit : Context.t -> Contract.t -> Tx_rollup.t -> - Tx_rollup_commitment.t -> + Tx_rollup_commitment.Full.t -> Operation.packed tzresult Lwt.t (** [tx_rollup_return_bond ctxt source tx_rollup] returns a commitment bond. *) @@ -298,6 +298,7 @@ val tx_rollup_dispatch_tickets : Context.t -> source:Contract.t -> message_index:int -> + message_result_path:Tx_rollup_commitment.Merkle.path -> Tx_rollup.t -> Tx_rollup_level.t -> Context_hash.t -> @@ -351,8 +352,11 @@ val tx_rollup_reject : Tx_rollup_message.t -> message_position:int -> message_path:Tx_rollup_inbox.Merkle.path -> + message_result_hash:Tx_rollup_message_result_hash.t -> + message_result_path:Tx_rollup_commitment.Merkle.path -> proof:Tx_rollup_l2_proof.t -> previous_message_result:Tx_rollup_message_result.t -> + previous_message_result_path:Tx_rollup_commitment.Merkle.path -> Operation.packed tzresult Lwt.t (** [sc_rollup_origination ctxt source kind boot_sector] originates a new 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 883ad3f87dfc..7446129c58a5 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 @@ -262,8 +262,11 @@ let l2_parameters : Context.t -> Tx_rollup_l2_apply.parameters tzresult Lwt.t = in return Tx_rollup_l2_apply.{tx_rollup_max_withdrawals_per_batch} -let commitment_testable = - Alcotest.testable Tx_rollup_commitment.pp Tx_rollup_commitment.( = ) +let commitment_compact_testable = + Alcotest.testable Tx_rollup_commitment.Compact.pp (fun r1 r2 -> + Tx_rollup_commitment_hash.equal + (Tx_rollup_commitment.Compact.hash r1) + (Tx_rollup_commitment.Compact.hash r2)) let commitment_hash_testable = Alcotest.testable Tx_rollup_commitment_hash.pp Tx_rollup_commitment_hash.( = ) @@ -369,11 +372,11 @@ let make_incomplete_commitment_for_batch context level tx_rollup withdraw_list = >|=? fun commitment_opt -> Option.map (fun Tx_rollup_commitment.Submitted_commitment.{commitment; _} -> - Tx_rollup_commitment.hash commitment) + Tx_rollup_commitment.Compact.hash commitment) commitment_opt) >>=? fun predecessor -> let inbox_merkle_root = metadata.merkle_root in - let commitment : Tx_rollup_commitment.t = + let commitment : Tx_rollup_commitment.Full.t = {level; messages; predecessor; inbox_merkle_root} in return (commitment, batches_result) @@ -1511,7 +1514,7 @@ let test_commitment_duplication () = withdraw_list_hash = Tx_rollup_withdraw_list_hash.empty; }) in - let commitment_with_wrong_count : Tx_rollup_commitment.t = + let commitment_with_wrong_count : Tx_rollup_commitment.Full.t = {commitment with messages = batches2} in Op.tx_rollup_commit (I i) contract2 tx_rollup commitment_with_wrong_count @@ -1556,11 +1559,16 @@ let test_commitment_duplication () = submitted_at; finalized_at; } -> + let compact_commitment = Tx_rollup_commitment.Full.compact commitment in Alcotest.( - check commitment_testable "Commitment" expected_commitment commitment) ; + check + commitment_compact_testable + "Commitment" + expected_commitment + compact_commitment) ; Alcotest.( check commitment_hash_testable "Commitment hash" expected_hash - @@ Tx_rollup_commitment.hash commitment) ; + @@ Tx_rollup_commitment.Compact.hash compact_commitment) ; Alcotest.(check public_key_hash_testable "Committer" pkh1 committer) ; Alcotest.( check raw_level_testable "Submitted" submitted_level submitted_at) ; @@ -1649,7 +1657,34 @@ let test_storage_burn_for_commitment () = Incremental.add_operation i op >>=? fun i -> occupied_storage_size (I i) tx_rollup >>=? fun storage_size_after_commit -> (* extra space should be allocated for submitting commitment *) - let commitment_add_delta = 99 in + let compact_commitment = Tx_rollup_commitment.Full.compact commitment in + let commitment_add_delta = + (* dummy values for the [Submitted_commitment] because we only + care about the size *) + Data_encoding.Binary.length + Tx_rollup_commitment.Submitted_commitment.encoding + { + commitment = compact_commitment; + commitment_hash = Tx_rollup_commitment.Compact.hash compact_commitment; + committer = is_implicit_exn contract; + submitted_at = Raw_level.root; + finalized_at = None; + } + in + let commitment_remove_delta = + (* dummy values for the [Submitted_commitment] because we only + care about the size *) + Data_encoding.Binary.length + Tx_rollup_commitment.Submitted_commitment.encoding + { + commitment = compact_commitment; + commitment_hash = Tx_rollup_commitment.Compact.hash compact_commitment; + committer = is_implicit_exn contract; + submitted_at = Raw_level.root; + (* It was finalized *) + finalized_at = Some Raw_level.root; + } + in check_storage_delta ~__POS__ "Size increase after adding commitment" @@ -1674,25 +1709,13 @@ let test_storage_burn_for_commitment () = Block.bake b ~operation >>=? fun b -> occupied_storage_size (B b) tx_rollup >>=? fun freed_space_after_remove_commitment -> - let commitment_remove_delta = -135 in + let commitment_remove_delta = -commitment_remove_delta in check_storage_delta ~__POS__ "Storage space is freed after removing commitment" ~size_before:freed_space_after_finalize ~size_after:freed_space_after_remove_commitment ~expected_delta:commitment_remove_delta ; - let msg_preallocation_delta = - Tx_rollup_prefixes.message_result_hash.hash_size - in - let finalization_delta = 4 in - Alcotest.( - check - ~pos:__POS__ - int - "The delta of adding and removing a commitment is zero (modulo \ - preallocation)" - (-(commitment_add_delta + msg_preallocation_delta + finalization_delta)) - commitment_remove_delta) ; (* test freed storage space after return bond *) Op.tx_rollup_return_bond (B b) contract tx_rollup >>=? fun operation -> Block.bake b ~operation >>=? fun b -> @@ -2148,7 +2171,7 @@ module Rejection = struct >>=? fun (commitment, _batches_result) -> Op.tx_rollup_commit (I i) contract1 tx_rollup commitment >>=? fun op -> Incremental.add_operation i op >|=? fun i -> - (i, contract1, tx_rollup, level, message) + (i, contract1, tx_rollup, level, message, commitment) let init_with_invalid_commitment () = init_with_bogus_batch () @@ -2172,7 +2195,7 @@ module Rejection = struct in Op.tx_rollup_commit (I i) contract1 tx_rollup commitment >>=? fun op -> Incremental.add_operation i op >|=? fun i -> - (i, contract1, tx_rollup, level, message) + (i, contract1, tx_rollup, level, message, commitment) let run_transaction ctxt l2_parameters msg = let open Prover_context.Syntax in @@ -2339,6 +2362,25 @@ module Rejection = struct in return (b, deposit, (sk, pk, addr), ticket_hash) + let make_rejection_param (commitment : Tx_rollup_commitment.Full.t) ~index = + let message_result_hash = + WithExceptions.Option.get + ~loc:__LOC__ + (List.nth commitment.messages index) + in + let tree = + List.fold_left + (fun tree m -> Tx_rollup_commitment.Merkle.snoc tree m) + Tx_rollup_commitment.Merkle.nil + commitment.messages + in + let path = + match Tx_rollup_commitment.Merkle.compute_path tree index with + | Ok x -> x + | Error _ -> assert false + in + (message_result_hash, path) + let init_with_deposit () = init_l2_store () >>= fun store -> context_init1 () >>=? fun (b, account) -> @@ -2369,6 +2411,9 @@ module Rejection = struct l2_parameters (I i) >>=? fun l2_parameters -> make_proof store l2_parameters deposit >>= fun proof -> Incremental.begin_construction b >>=? fun i -> + let (message_result_hash, message_result_path) = + make_rejection_param commitment ~index:0 + in Op.tx_rollup_reject (I i) account @@ -2377,8 +2422,11 @@ module Rejection = struct deposit ~message_position:0 ~message_path + ~message_result_hash + ~message_result_path ~proof ~previous_message_result + ~previous_message_result_path:Tx_rollup_commitment.Merkle.dummy_path >>=? fun op -> Incremental.add_operation i @@ -2471,6 +2519,9 @@ module Rejection = struct (* Now we produce a valid proof rejecting the commitment *) l2_parameters (I i) >>=? fun l2_parameters -> make_proof store l2_parameters message >>= fun proof -> + let (message_result_hash, message_result_path) = + make_rejection_param commitment ~index:0 + in Op.tx_rollup_reject (B b) account @@ -2479,12 +2530,15 @@ module Rejection = struct message ~message_position:0 ~message_path + ~message_result_hash + ~message_result_path ~proof ~previous_message_result: { context_hash = l2_context_hash; withdraw_list_hash = Tx_rollup_withdraw_list_hash.empty; } + ~previous_message_result_path:Tx_rollup_commitment.Merkle.dummy_path >>=? fun op -> Incremental.add_operation i op >>=? fun _ -> return_unit @@ -2521,6 +2575,9 @@ module Rejection = struct (* Now we produce a valid proof rejecting the commitment *) l2_parameters (B b) >>=? fun l2_parameters -> make_proof store l2_parameters message >>= fun proof -> + let (message_result_hash, message_result_path) = + make_rejection_param commitment ~index:0 + in Op.tx_rollup_reject (B b) account @@ -2529,12 +2586,15 @@ module Rejection = struct message ~message_position:0 ~message_path + ~message_result_hash + ~message_result_path ~proof ~previous_message_result: { context_hash = l2_context_hash; withdraw_list_hash = Tx_rollup_withdraw_list_hash.empty; } + ~previous_message_result_path:Tx_rollup_commitment.Merkle.dummy_path >>=? fun op -> Incremental.add_operation i @@ -2580,6 +2640,9 @@ module Rejection = struct (* Now we produce a valid proof rejecting the commitment *) l2_parameters (B b) >>=? fun l2_parameters -> make_proof store l2_parameters message >>= fun proof -> + let (message_result_hash, message_result_path) = + make_rejection_param commitment ~index:0 + in Op.tx_rollup_reject (B b) account @@ -2588,21 +2651,24 @@ module Rejection = struct message ~message_position:0 ~message_path + ~message_result_hash + ~message_result_path ~proof ~previous_message_result: { context_hash = l2_context_hash; withdraw_list_hash = Tx_rollup_withdraw_list_hash.empty; } + ~previous_message_result_path:Tx_rollup_commitment.Merkle.dummy_path >>=? fun op -> Incremental.add_operation i op >>=? fun _ -> return_unit (** Test that an empty proof is enough to reject a commitment on an - invalid message. Yhe committed message does not change the + invalid message. The committed message does not change the context at all (i.e. the message can not be decoded). *) let test_empty_proof_on_invalid_message () = init_with_invalid_commitment () - >>=? fun (i, contract, tx_rollup, level, message) -> + >>=? fun (i, contract, tx_rollup, level, message, commitment) -> let (msg, _) = Tx_rollup_message.make_batch message in let message_hash = Tx_rollup_message.hash_uncarbonated msg in let message_path = @@ -2612,6 +2678,9 @@ module Rejection = struct in l2_parameters (I i) >>=? fun l2_parameters -> valid_empty_proof l2_parameters >>= fun proof -> + let (message_result_hash, message_result_path) = + make_rejection_param commitment ~index:0 + in Op.tx_rollup_reject (I i) contract @@ -2620,15 +2689,18 @@ module Rejection = struct msg ~message_position:0 ~message_path + ~message_result_hash + ~message_result_path ~proof ~previous_message_result + ~previous_message_result_path:Tx_rollup_commitment.Merkle.dummy_path >>=? fun op -> Incremental.add_operation i op >>=? fun _ -> return_unit (** Test that an empty proof is not able to reject a valid commitment. *) let test_invalid_proof_on_invalid_commitment () = init_with_valid_commitment () - >>=? fun (i, contract, tx_rollup, level, message) -> + >>=? fun (i, contract, tx_rollup, level, message, commitment) -> let (msg, _) = Tx_rollup_message.make_batch message in let message_hash = Tx_rollup_message.hash_uncarbonated msg in let message_path = @@ -2636,6 +2708,9 @@ module Rejection = struct | Error _ -> assert false | Ok path -> path in + let (message_result_hash, message_result_path) = + make_rejection_param commitment ~index:0 + in Op.tx_rollup_reject (I i) contract @@ -2644,8 +2719,11 @@ module Rejection = struct msg ~message_position:0 ~message_path + ~message_result_hash + ~message_result_path ~proof:invalid_proof ~previous_message_result + ~previous_message_result_path:Tx_rollup_commitment.Merkle.dummy_path >>=? fun op -> Incremental.add_operation i @@ -2658,7 +2736,7 @@ module Rejection = struct the previous state. *) let test_invalid_agreed () = init_with_valid_commitment () - >>=? fun (i, contract, tx_rollup, level, message) -> + >>=? fun (i, contract, tx_rollup, level, message, commitment) -> let (msg, _) = Tx_rollup_message.make_batch message in (* This intentionally does not match *) let previous_message_result : Tx_rollup_message_result.t = @@ -2674,6 +2752,9 @@ module Rejection = struct | Error _ -> assert false | Ok path -> path in + let (message_result_hash, message_result_path) = + make_rejection_param commitment ~index:0 + in Op.tx_rollup_reject (I i) contract @@ -2683,22 +2764,24 @@ module Rejection = struct ~message_position:0 ~message_path ~proof:invalid_proof (* doesn't matter -- we'll never check it*) + ~message_result_hash + ~message_result_path ~previous_message_result + ~previous_message_result_path:Tx_rollup_commitment.Merkle.dummy_path >>=? fun op -> Incremental.add_operation i op ~expect_failure: (check_proto_error - (Tx_rollup_errors.Wrong_rejection_hashes + (Tx_rollup_errors.Wrong_rejection_hash { - provided = previous_message_result; - computed = - Tx_rollup_message_result_hash.of_b58check_exn - "txmr22wWTUoPCUMd1CjAE1cgRFc63ukwCQ3gbp7dLyaBxPhEGguWHR"; + provided = + Tx_rollup_message_result_hash.hash previous_message_result; expected = - Tx_rollup_message_result_hash.of_b58check_exn - "txmr344vtdPzvWsfnoSd3mJ3MCFA5ehKLQs1pK9WGcX4FEACg1rVgC"; + `Hash + (Tx_rollup_message_result_hash.of_b58check_exn + "txmr344vtdPzvWsfnoSd3mJ3MCFA5ehKLQs1pK9WGcX4FEACg1rVgC"); })) >>=? fun _ -> return_unit @@ -2733,8 +2816,11 @@ module Rejection = struct message ~message_position:0 ~message_path + ~message_result_hash:Tx_rollup_message_result_hash.zero + ~message_result_path:Tx_rollup_commitment.Merkle.dummy_path ~proof ~previous_message_result + ~previous_message_result_path:Tx_rollup_commitment.Merkle.dummy_path >>=? fun op -> Incremental.add_operation i @@ -2749,7 +2835,7 @@ module Rejection = struct already final *) let test_commitment_is_final () = init_with_valid_commitment () - >>=? fun (i, contract, tx_rollup, level, message) -> + >>=? fun (i, contract, tx_rollup, level, message, commitment) -> (* Create a new commitment so that once we have finalized the first one, we still have a range of valid final commitments *) Op.tx_rollup_submit_batch (I i) contract tx_rollup message >>=? fun op -> @@ -2772,6 +2858,9 @@ module Rejection = struct in l2_parameters (I i) >>=? fun l2_parameters -> valid_empty_proof l2_parameters >>= fun proof -> + let (message_result_hash, message_result_path) = + make_rejection_param commitment ~index:0 + in Op.tx_rollup_reject (I i) contract @@ -2780,8 +2869,11 @@ module Rejection = struct message ~message_position:0 ~message_path + ~message_result_hash + ~message_result_path ~proof ~previous_message_result + ~previous_message_result_path:Tx_rollup_commitment.Merkle.dummy_path >>=? fun op -> Incremental.add_operation i @@ -2796,7 +2888,7 @@ module Rejection = struct match the one stored in the inbox *) let test_wrong_message_hash () = init_with_valid_commitment () - >>=? fun (i, contract1, tx_rollup, level, prev_message) -> + >>=? fun (i, contract1, tx_rollup, level, prev_message, commitment) -> let (prev_message, _size) = Tx_rollup_message.make_batch prev_message in let prev_message_hash = Tx_rollup_message.hash_uncarbonated prev_message in let expected_root = @@ -2811,6 +2903,9 @@ module Rejection = struct in l2_parameters (I i) >>=? fun l2_parameters -> valid_empty_proof l2_parameters >>= fun proof -> + let (message_result_hash, message_result_path) = + make_rejection_param commitment ~index:0 + in Op.tx_rollup_reject (I i) contract1 @@ -2819,8 +2914,11 @@ module Rejection = struct message ~message_position:0 ~message_path + ~message_result_hash + ~message_result_path ~proof ~previous_message_result + ~previous_message_result_path:Tx_rollup_commitment.Merkle.dummy_path >>=? fun op -> Incremental.add_operation i @@ -2834,7 +2932,7 @@ module Rejection = struct exist in the inbox. *) let test_wrong_message_position () = init_with_valid_commitment () - >>=? fun (i, contract1, tx_rollup, level, message) -> + >>=? fun (i, contract1, tx_rollup, level, message, _commitment) -> let (message, _size) = Tx_rollup_message.make_batch message in let message_hash = Tx_rollup_message.hash_uncarbonated message in let message_path = @@ -2852,8 +2950,11 @@ module Rejection = struct message ~message_position:1 ~message_path + ~message_result_hash:Tx_rollup_message_result_hash.zero + ~message_result_path:Tx_rollup_commitment.Merkle.dummy_path ~proof ~previous_message_result + ~previous_message_result_path:Tx_rollup_commitment.Merkle.dummy_path >>=? fun op -> Incremental.add_operation i @@ -2912,6 +3013,9 @@ module Rejection = struct Incremental.add_operation i op >>=? fun i -> Incremental.finalize_block i >>=? fun b -> Incremental.begin_construction b >>=? fun i -> + let (message_result_hash, message_result_path) = + make_rejection_param commitment ~index:0 + in Op.tx_rollup_reject (I i) account @@ -2920,8 +3024,11 @@ module Rejection = struct deposit_message ~message_position:0 ~message_path + ~message_result_hash + ~message_result_path ~proof:invalid_proof ~previous_message_result + ~previous_message_result_path:Tx_rollup_commitment.Merkle.dummy_path >>=? fun op -> Incremental.add_operation i @@ -2940,8 +3047,11 @@ module Rejection = struct deposit_message ~message_position:0 ~message_path + ~message_result_hash + ~message_result_path ~proof ~previous_message_result + ~previous_message_result_path:Tx_rollup_commitment.Merkle.dummy_path >>=? fun op -> Incremental.add_operation i op >>=? fun _ -> return_unit @@ -3010,6 +3120,9 @@ module Rejection = struct l2_parameters (I i) >>=? fun l2_parameters -> make_proof store l2_parameters deposit >>= fun proof -> Incremental.begin_construction b >>=? fun i -> + let (message_result_hash, message_result_path) = + make_rejection_param commitment ~index:0 + in Op.tx_rollup_reject (I i) account @@ -3018,8 +3131,11 @@ module Rejection = struct deposit ~message_position:0 ~message_path + ~message_result_hash + ~message_result_path ~proof ~previous_message_result + ~previous_message_result_path:Tx_rollup_commitment.Merkle.dummy_path >>=? fun op -> return (i, op) (** Test that a commitment which require a too-large proof can be rejected @@ -3079,6 +3195,9 @@ module Rejection = struct (* We try to reject with the truncated proof which is already above the size limit. *) Incremental.begin_construction b >>=? fun i -> + let (message_result_hash, message_result_path) = + make_rejection_param commitment ~index:0 + in Op.tx_rollup_reject (I i) account @@ -3087,8 +3206,11 @@ module Rejection = struct deposit ~message_position:0 ~message_path + ~message_result_hash + ~message_result_path ~proof:proof_truncated ~previous_message_result + ~previous_message_result_path:Tx_rollup_commitment.Merkle.dummy_path >>=? fun op -> Incremental.add_operation i op >>=? fun _ -> return_unit @@ -3158,9 +3280,12 @@ let test_state () = >>=? fun operation -> Block.bake b ~operation in - let reject ?expect_failure b level = + let reject ?expect_failure b level commitment = l2_parameters (B b) >>=? fun l2_parameters -> Rejection.valid_empty_proof l2_parameters >>= fun proof -> + let (message_result_hash, message_result_path) = + Rejection.make_rejection_param commitment ~index:0 + in Op.tx_rollup_reject (B b) account1 @@ -3169,8 +3294,11 @@ let test_state () = message ~message_position:0 ~message_path + ~message_result_hash + ~message_result_path ~proof ~previous_message_result:Rejection.previous_message_result + ~previous_message_result_path:Tx_rollup_commitment.Merkle.dummy_path >>=? fun operation -> Incremental.begin_construction b >>=? fun i -> Incremental.add_operation i operation ?expect_failure >>=? fun i -> @@ -3195,7 +3323,7 @@ let test_state () = Op.tx_rollup_commit (B b) account1 tx_rollup commit1 >>=? fun operation -> Block.bake b ~operation >>=? fun b -> (* Reject the commitment *) - reject b Tx_rollup_level.root >>=? fun b -> + reject b Tx_rollup_level.root commit1 >>=? fun b -> (* Check that we went back to the initial state *) Context.Tx_rollup.state (B b) tx_rollup >>=? fun state_after_reject -> Alcotest.( @@ -3212,13 +3340,14 @@ let test_state () = { commit1 with level = Tx_rollup_level.succ commit1.level; - predecessor = Some (Tx_rollup_commitment.hash commit1); + predecessor = + Some Tx_rollup_commitment.(Compact.hash @@ Full.compact commit1); } in Op.tx_rollup_commit (B b) account1 tx_rollup commit2 >>=? fun operation -> Block.bake b ~operation >>=? fun b -> (* Reject the first commitment *) - reject b Tx_rollup_level.root >>=? fun b -> + reject b Tx_rollup_level.root commit1 >>=? fun b -> (* Check that we went back to the initial state *) Context.Tx_rollup.state (B b) tx_rollup >>=? fun state_after_reject -> Alcotest.( @@ -3238,7 +3367,7 @@ let test_state () = in let commit2 = Tx_rollup_commitment. - {commit2 with predecessor = Some (Tx_rollup_commitment.hash commit1)} + {commit2 with predecessor = Some (Compact.hash @@ Full.compact commit1)} in Op.tx_rollup_commit (B b) account1 tx_rollup commit1 >>=? fun operation -> Block.bake b ~operation >>=? fun b -> @@ -3254,13 +3383,14 @@ let test_state () = reject b Tx_rollup_level.root + commit1 ~expect_failure: (check_proto_error_f (function | Tx_rollup_errors.Cannot_reject_level _ -> true | _ -> false)) >>=? fun b -> (* We can reject level 1 *) - reject b Tx_rollup_level.(succ root) >>=? fun b -> + reject b Tx_rollup_level.(succ root) commit2 >>=? fun b -> (* There is no commitment to finalize anymore *) Block.bake b ~operations:[] >>=? fun b -> Block.bake b ~operations:[] >>=? fun b -> @@ -3317,7 +3447,8 @@ let test_state_with_deleted () = { level = Tx_rollup_level.succ commit0.level; messages = [Tx_rollup_message_result_hash.zero]; - predecessor = Some (Tx_rollup_commitment.hash commit0); + predecessor = + Some Tx_rollup_commitment.(Compact.hash @@ Full.compact commit0); inbox_merkle_root = inbox_hash; } in @@ -3336,9 +3467,12 @@ let test_state_with_deleted () = Incremental.add_operation i operation >>=? fun i -> Incremental.finalize_block i >>=? fun b -> (* Reject *) - let reject ?expect_failure b level = + let reject ?expect_failure b level commitment = l2_parameters (B b) >>=? fun l2_parameters -> Rejection.valid_empty_proof l2_parameters >>= fun proof -> + let (message_result_hash, message_result_path) = + Rejection.make_rejection_param commitment ~index:0 + in Op.tx_rollup_reject (B b) account1 @@ -3347,14 +3481,17 @@ let test_state_with_deleted () = message ~message_position:0 ~message_path + ~message_result_hash + ~message_result_path ~proof ~previous_message_result:Rejection.previous_message_result + ~previous_message_result_path:Tx_rollup_commitment.Merkle.dummy_path >>=? fun operation -> Incremental.begin_construction b >>=? fun i -> Incremental.add_operation i operation ?expect_failure >>=? fun i -> Incremental.finalize_block i in - reject b commit1.level >>=? fun b -> + reject b commit1.level commit1 >>=? fun b -> ignore b ; return_unit @@ -3386,8 +3523,7 @@ let test_state_message_storage_preallocation () = zestable "the storage occupied by the first message is the size of the inbox plus \ the preallocation for commiting the message" - (Z.of_int - (inbox_preparation + Tx_rollup_prefixes.message_result_hash.hash_size)) + (Z.of_int inbox_preparation) (Z.sub occupied_storage_after occupied_storage_before) ; let occupied_storage_before = Tx_rollup_state.Internal_for_tests.get_occupied_storage state @@ -3400,8 +3536,8 @@ let test_state_message_storage_preallocation () = Alcotest.check ~pos:__POS__ zestable - "the storage occupied by the second message is just the preallocation" - (Z.of_int Tx_rollup_prefixes.message_result_hash.hash_size) + "the storage occupied by the second message null thanks to the merklisation" + Z.zero (Z.sub occupied_storage_after occupied_storage_before) ; return_unit @@ -3628,7 +3764,7 @@ module Withdraw = struct ~tx_rollup ~withdrawals:[(0, [withdraw1; withdraw2])] block - >>=? fun (_commitment, context_hash_list, committed_level, block) -> + >>=? fun (commitment, context_hash_list, committed_level, block) -> let message_index = 0 in let context_hash = WithExceptions.Option.get @@ -3639,10 +3775,14 @@ module Withdraw = struct >>=? fun storage_size_before_withdraw -> (* -- At this point, everything is in place for the user to execute the withdrawal -- *) + let (_message_result_hash, message_result_path) = + Rejection.make_rejection_param commitment ~index:0 + in Op.tx_rollup_dispatch_tickets (B block) ~source:account1 ~message_index + ~message_result_path tx_rollup committed_level context_hash @@ -3829,6 +3969,7 @@ module Withdraw = struct (I incr) ~source:account1 ~message_index:0 (* any indexes will fail *) + ~message_result_path:Tx_rollup_commitment.Merkle.dummy_path tx_rollup Tx_rollup_level.root (Context_hash.hash_bytes [Bytes.make 20 'c']) @@ -3863,15 +4004,19 @@ module Withdraw = struct ~tx_rollup ~withdrawals:[] block - >>=? fun (_commitment, context_hash_list, committed_level, block) -> + >>=? fun (commitment, context_hash_list, committed_level, block) -> let context_hash = WithExceptions.Option.get ~loc:__LOC__ @@ List.nth context_hash_list 0 in Incremental.begin_construction block >>=? fun incr -> + let (_message_result_hash, message_result_path) = + Rejection.make_rejection_param commitment ~index:0 + in Op.tx_rollup_dispatch_tickets (I incr) ~source:account1 ~message_index:0 + ~message_result_path tx_rollup committed_level context_hash @@ -3907,7 +4052,7 @@ module Withdraw = struct ~tx_rollup ~withdrawals:[(0, [withdraw])] block - >>=? fun (_commitment, context_hash_list, committed_level, block) -> + >>=? fun (commitment, context_hash_list, committed_level, block) -> let context_hash = WithExceptions.Option.get ~loc:__LOC__ @@ -3915,10 +4060,14 @@ module Withdraw = struct in Incremental.begin_construction block >>=? fun incr -> (* Try with invalid amounts *) + let (_message_result_hash, message_result_path) = + Rejection.make_rejection_param commitment ~index:0 + in Op.tx_rollup_dispatch_tickets (I incr) ~source:account1 ~message_index + ~message_result_path tx_rollup committed_level context_hash @@ -3926,7 +4075,11 @@ module Withdraw = struct >>=? fun operation -> Incremental.add_operation ~expect_failure: - (check_proto_error Tx_rollup_errors.Withdrawals_invalid_path) + (check_proto_error_f @@ function + | Tx_rollup_errors.Wrong_rejection_hash + {provided = _; expected = `Valid_path (_, 0)} -> + true + | _ -> false) incr operation >>=? fun _incr -> @@ -3935,6 +4088,7 @@ module Withdraw = struct (I incr) ~source:account1 ~message_index + ~message_result_path tx_rollup committed_level context_hash @@ -3942,7 +4096,11 @@ module Withdraw = struct >>=? fun operation -> Incremental.add_operation ~expect_failure: - (check_proto_error Tx_rollup_errors.Withdrawals_invalid_path) + (check_proto_error_f @@ function + | Tx_rollup_errors.Wrong_rejection_hash + {provided = _; expected = `Valid_path (_, 0)} -> + true + | _ -> false) incr operation >>=? fun _incr -> @@ -3951,6 +4109,7 @@ module Withdraw = struct (I incr) ~source:account1 ~message_index + ~message_result_path tx_rollup committed_level context_hash @@ -3971,6 +4130,7 @@ module Withdraw = struct (I incr) ~source:account1 ~message_index + ~message_result_path tx_rollup committed_level context_hash @@ -3978,7 +4138,11 @@ module Withdraw = struct >>=? fun operation -> Incremental.add_operation ~expect_failure: - (check_proto_error Tx_rollup_errors.Withdrawals_invalid_path) + (check_proto_error_f @@ function + | Tx_rollup_errors.Wrong_rejection_hash + {provided = _; expected = `Valid_path (_, 0)} -> + true + | _ -> false) incr operation >>=? fun _incr -> @@ -3987,6 +4151,7 @@ module Withdraw = struct (I incr) ~source:account1 ~message_index + ~message_result_path tx_rollup committed_level context_hash @@ -3994,7 +4159,11 @@ module Withdraw = struct >>=? fun operation -> Incremental.add_operation ~expect_failure: - (check_proto_error Tx_rollup_errors.Withdrawals_invalid_path) + (check_proto_error_f @@ function + | Tx_rollup_errors.Wrong_rejection_hash + {provided = _; expected = `Valid_path (_, 0)} -> + true + | _ -> false) incr operation >>=? fun _incr -> return_unit @@ -4019,17 +4188,21 @@ module Withdraw = struct ~tx_rollup ~withdrawals:[(0, [withdraw])] block - >>=? fun (_commitment, context_hash_list, committed_level, block) -> + >>=? fun (commitment, context_hash_list, committed_level, block) -> let message_index = 0 in let context_hash = WithExceptions.Option.get ~loc:__LOC__ (List.nth context_hash_list message_index) in + let (_message_result_hash, message_result_path) = + Rejection.make_rejection_param commitment ~index:0 + in Op.tx_rollup_dispatch_tickets (B block) ~source:account1 ~message_index + ~message_result_path tx_rollup committed_level context_hash @@ -4041,6 +4214,7 @@ module Withdraw = struct (B block) ~source:account1 ~message_index + ~message_result_path tx_rollup committed_level context_hash @@ -4106,7 +4280,7 @@ module Withdraw = struct (second_message_index, second_withdrawals); ] block - >>=? fun (_commitment, context_hash_list, committed_level, block) -> + >>=? fun (commitment, context_hash_list, committed_level, block) -> let first_context_hash = WithExceptions.Option.get ~loc:__LOC__ @@ -4117,10 +4291,17 @@ module Withdraw = struct ~loc:__LOC__ (List.nth context_hash_list second_message_index) in + let (_message_result_hash, path1) = + Rejection.make_rejection_param commitment ~index:first_message_index + in + let (_message_result_hash, path2) = + Rejection.make_rejection_param commitment ~index:second_message_index + in Op.tx_rollup_dispatch_tickets (B block) ~source:account1 ~message_index:first_message_index + ~message_result_path:path1 tx_rollup committed_level first_context_hash @@ -4166,6 +4347,7 @@ module Withdraw = struct (B block) ~source:account1 ~message_index:second_message_index + ~message_result_path:path2 tx_rollup committed_level second_context_hash @@ -4237,10 +4419,17 @@ module Withdraw = struct in Incremental.begin_construction block >>=? fun incr -> (* try with wrong context hash *) + let (_message_result_hash, path1) = + Rejection.make_rejection_param commitment ~index:valid_message_index + in + let (_message_result_hash, path2) = + Rejection.make_rejection_param commitment ~index:wrong_message_index + in Op.tx_rollup_dispatch_tickets (I incr) ~source:account1 ~message_index:valid_message_index + ~message_result_path:path1 tx_rollup Tx_rollup_level.(succ root) wrong_context_hash @@ -4248,7 +4437,11 @@ module Withdraw = struct >>=? fun operation -> Incremental.add_operation ~expect_failure: - (check_proto_error Tx_rollup_errors.Withdrawals_invalid_path) + (check_proto_error_f @@ function + | Tx_rollup_errors.Wrong_rejection_hash + {provided = _; expected = `Valid_path (_, idx)} -> + Compare.Int.(idx = valid_message_index) + | _ -> false) incr operation >>=? fun _i -> @@ -4257,6 +4450,7 @@ module Withdraw = struct (I incr) ~source:account1 ~message_index:wrong_message_index + ~message_result_path:path2 tx_rollup Tx_rollup_level.(succ root) valid_context_hash @@ -4264,7 +4458,11 @@ module Withdraw = struct >>=? fun operation -> Incremental.add_operation ~expect_failure: - (check_proto_error Tx_rollup_errors.Withdrawals_invalid_path) + (check_proto_error_f @@ function + | Tx_rollup_errors.Wrong_rejection_hash + {provided = _; expected = `Valid_path (_, idx)} -> + Compare.Int.(idx = wrong_message_index) + | _ -> false) incr operation >>=? fun _i -> @@ -4273,6 +4471,7 @@ module Withdraw = struct (I incr) ~source:account1 ~message_index:valid_message_index + ~message_result_path:path1 tx_rollup Tx_rollup_level.(succ root) valid_context_hash @@ -4300,7 +4499,7 @@ module Withdraw = struct ~tx_rollup ~withdrawals:[(message_index, [withdraw])] block - >>=? fun (_commitment, context_hash_list, committed_level, block) -> + >>=? fun (commitment, context_hash_list, committed_level, block) -> let context_hash = WithExceptions.Option.get ~loc:__LOC__ @@ List.nth context_hash_list message_index @@ -4311,10 +4510,14 @@ module Withdraw = struct Block.bake ~operation block >>=? fun block -> (* At this point, the reveal can no longer be executed *) Incremental.begin_construction block >>=? fun incr -> + let (_message_result_hash, message_result_path) = + Rejection.make_rejection_param commitment ~index:message_index + in Op.tx_rollup_dispatch_tickets (I incr) ~source:account1 ~message_index + ~message_result_path tx_rollup committed_level context_hash @@ -4364,7 +4567,7 @@ module Withdraw = struct ~tx_rollup ~withdrawals:[(0, [withdraw])] b - >>=? fun (_commitment, context_hash_list, committed_level, b) -> + >>=? fun (commitment, context_hash_list, committed_level, b) -> let context_hash = WithExceptions.Option.get ~loc:__LOC__ (List.nth context_hash_list 0) in @@ -4376,10 +4579,14 @@ module Withdraw = struct >>=? fun () -> (* Exexute with withdrawal *) Incremental.begin_construction b >>=? fun incr -> + let (_message_result_hash, message_result_path) = + Rejection.make_rejection_param commitment ~index:0 + in Op.tx_rollup_dispatch_tickets (I incr) ~source:account1 ~message_index:0 + ~message_result_path tx_rollup committed_level context_hash @@ -4448,6 +4655,9 @@ module Withdraw = struct Tx_rollup_inbox.Merkle.( compute_path [Tx_rollup_message.hash_uncarbonated message] 0) in + let (message_result_hash, message_result_path) = + Rejection.make_rejection_param commitment ~index:0 + in Op.tx_rollup_reject (I i) account @@ -4456,8 +4666,11 @@ module Withdraw = struct message ~message_position:0 ~message_path + ~message_result_hash + ~message_result_path ~proof ~previous_message_result + ~previous_message_result_path:Tx_rollup_commitment.Merkle.dummy_path >>=? fun op -> Incremental.add_operation i 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 b1c9fa5252ae..2774747ce23c 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_commitment_repr.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_commitment_repr.ml @@ -25,7 +25,7 @@ (* *) (*****************************************************************************) -module Commitment_hash = struct +module Hash = struct let commitment_hash = Tx_rollup_prefixes.commitment_hash.b58check_prefix module H = @@ -61,48 +61,58 @@ module Commitment_hash = struct () end -type t = { - level : Tx_rollup_level_repr.t; - messages : Tx_rollup_message_result_hash_repr.t list; - predecessor : Commitment_hash.t option; - inbox_merkle_root : Tx_rollup_inbox_repr.Merkle.root; -} +module Merkle_hash = struct + module H = + Blake2B.Make + (Base58) + (struct + let name = "Message_result_list_hash" + + let title = "A merklised message result list hash" + + let b58check_prefix = + Tx_rollup_prefixes.message_result_list_hash.b58check_prefix + + let size = Some Tx_rollup_prefixes.message_result_list_hash.hash_size + end) + + include H + include Path_encoding.Make_hex (H) -let compare_or cmp c1 c2 f = match cmp c1 c2 with 0 -> f () | diff -> diff + let () = + Tx_rollup_prefixes.( + check_encoding message_result_list_hash b58check_encoding) +end -include Compare.Make (struct - type nonrec t = t +module Merkle = + Merkle_list.Make (Tx_rollup_message_result_hash_repr) (Merkle_hash) - module Compare_root_list = Compare.List (Tx_rollup_message_result_hash_repr) +type 'a template = { + level : Tx_rollup_level_repr.t; + messages : 'a; + predecessor : Hash.t option; + inbox_merkle_root : Tx_rollup_inbox_repr.Merkle.root; +} - let compare r1 r2 = - compare_or Tx_rollup_level_repr.compare r1.level r2.level (fun () -> - compare_or Compare_root_list.compare r1.messages r2.messages (fun () -> - compare_or - (Option.compare Commitment_hash.compare) - r1.predecessor - r2.predecessor - (fun () -> - Tx_rollup_inbox_repr.Merkle.compare - r1.inbox_merkle_root - r2.inbox_merkle_root))) -end) +let map_template f x = {x with messages = f x.messages} -let pp : Format.formatter -> t -> unit = - fun fmt t -> +let pp_template : + (Format.formatter -> 'a -> unit) -> Format.formatter -> 'a template -> unit + = + fun pp_messages fmt t -> Format.fprintf fmt "commitment %a : messages = %a predecessor %a for inbox with merkle root %a" Tx_rollup_level_repr.pp t.level - (Format.pp_print_list Tx_rollup_message_result_hash_repr.pp) + pp_messages t.messages - (Format.pp_print_option Commitment_hash.pp) + (Format.pp_print_option Hash.pp) t.predecessor Tx_rollup_inbox_repr.Merkle.pp_root t.inbox_merkle_root -let encoding = +let encoding_template encoding = let open Data_encoding in conv (fun {level; messages; predecessor; inbox_merkle_root} -> @@ -111,31 +121,79 @@ let encoding = {level; messages; predecessor; inbox_merkle_root}) (obj4 (req "level" Tx_rollup_level_repr.encoding) - (req "batches" (list Tx_rollup_message_result_hash_repr.encoding)) - (req "predecessor" (option Commitment_hash.encoding)) + (req "messages" encoding) + (req "predecessor" (option Hash.encoding)) (req "inbox_merkle_root" Tx_rollup_inbox_repr.Merkle.root_encoding)) -let hash c = - let bytes = Data_encoding.Binary.to_bytes_exn encoding c in - Commitment_hash.hash_bytes [bytes] +module Compact = struct + type excerpt = { + count : int; + root : Merkle.h; + last_result_message_hash : Tx_rollup_message_result_hash_repr.t; + } + + type t = excerpt template -let check_message_result : - t -> Tx_rollup_message_result_repr.t -> message_index:int -> bool = - fun {messages; _} result ~message_index -> - let computed = Tx_rollup_message_result_hash_repr.hash result in - match List.nth messages message_index with - | Some expected -> Tx_rollup_message_result_hash_repr.(computed = expected) - | None -> false + let pp = + pp_template (fun fmt {count; root; last_result_message_hash} -> + Format.fprintf + fmt + "count: %d, root: %a, last_result_message_hash: %a" + count + Merkle_hash.pp + root + Tx_rollup_message_result_hash_repr.pp + last_result_message_hash) + + let encoding = + encoding_template + Data_encoding.( + conv + (fun {count; root; last_result_message_hash} -> + (count, root, last_result_message_hash)) + (fun (count, root, last_result_message_hash) -> + {count; root; last_result_message_hash}) + @@ obj3 + (req "count" int31) + (req "root" Merkle_hash.encoding) + (req + "last_message_result_hash" + Tx_rollup_message_result_hash_repr.encoding)) + + let hash t = + let bytes = Data_encoding.Binary.to_bytes_exn encoding t in + Hash.hash_bytes [bytes] +end + +module Full = struct + type t = Tx_rollup_message_result_hash_repr.t list template + + let pp = + pp_template (Format.pp_print_list Tx_rollup_message_result_hash_repr.pp) + + let encoding : t Data_encoding.t = + encoding_template + (Data_encoding.list Tx_rollup_message_result_hash_repr.encoding) + + let compact full = + map_template + (fun list -> + List.fold_left + (fun (acc, tree, _) m -> (acc + 1, Merkle.snoc tree m, m)) + (0, Merkle.nil, Tx_rollup_message_result_hash_repr.zero) + list + |> fun (count, tree, last_result_message_hash) -> + Compact.{count; root = Merkle.root tree; last_result_message_hash}) + full +end module Index = struct - type t = Commitment_hash.t + type t = Hash.t let path_length = 1 let to_path c l = - let raw_key = - Data_encoding.Binary.to_bytes_exn Commitment_hash.encoding c - in + let raw_key = Data_encoding.Binary.to_bytes_exn Hash.encoding c in let (`Hex key) = Hex.of_bytes raw_key in key :: l @@ -143,26 +201,27 @@ module Index = struct | [key] -> Option.bind (Hex.to_bytes (`Hex key)) - (Data_encoding.Binary.of_bytes_opt Commitment_hash.encoding) + (Data_encoding.Binary.of_bytes_opt Hash.encoding) | _ -> None - let rpc_arg = Commitment_hash.rpc_arg + let rpc_arg = Hash.rpc_arg - let encoding = Commitment_hash.encoding + let encoding = Hash.encoding - let compare = Commitment_hash.compare + let compare = Hash.compare end module Submitted_commitment = struct type nonrec t = { - commitment : t; - commitment_hash : Commitment_hash.t; + commitment : Compact.t; + commitment_hash : Hash.t; committer : Signature.Public_key_hash.t; submitted_at : Raw_level_repr.t; finalized_at : Raw_level_repr.t option; } let encoding = + let compact = Compact.encoding in let open Data_encoding in conv (fun {commitment; commitment_hash; committer; submitted_at; finalized_at} -> @@ -170,8 +229,8 @@ module Submitted_commitment = struct (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 "commitment" compact) + (req "commitment_hash" Hash.encoding) (req "committer" Signature.Public_key_hash.encoding) (req "submitted_at" Raw_level_repr.encoding) (opt "finalized_at" Raw_level_repr.encoding)) 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 162570d3fde6..8a396f24d398 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_commitment_repr.mli +++ b/src/proto_alpha/lib_protocol/tx_rollup_commitment_repr.mli @@ -27,12 +27,19 @@ (** A specialized Blake2B implementation for hashing commitments with "toc1" as a base58 prefix *) -module Commitment_hash : sig +module Hash : sig val commitment_hash : string include S.HASH end +module Merkle_hash : S.HASH + +module Merkle : + Merkle_list.T + with type elt = Tx_rollup_message_result_hash_repr.t + and type h = Merkle_hash.t + (** A commitment describes the interpretation of the messages stored in the inbox of a particular [level], on top of a particular layer-2 context. @@ -43,36 +50,48 @@ end [predecessor] is [None], the commitment is for the first inbox with messages in this rollup, and the initial Merkle root is the empty tree. *) -type t = { +type 'a template = { level : Tx_rollup_level_repr.t; - messages : Tx_rollup_message_result_hash_repr.t list; - predecessor : Commitment_hash.t option; + messages : 'a; + predecessor : Hash.t option; inbox_merkle_root : Tx_rollup_inbox_repr.Merkle.root; } -include Compare.S with type t := t +module Compact : sig + type excerpt = { + count : int; + root : Merkle.h; + last_result_message_hash : Tx_rollup_message_result_hash_repr.t; + } + + type t = excerpt template -val pp : Format.formatter -> t -> unit + val pp : Format.formatter -> t -> unit -val encoding : t Data_encoding.t + val encoding : t Data_encoding.t -val hash : t -> Commitment_hash.t + val hash : t -> Hash.t +end -(** [check_message_result commitment result message_index] returns true - if the message result hash of the batch in [commitment] indexed by - [message_index] corresponds to the hash of [result]. *) -val check_message_result : - t -> Tx_rollup_message_result_repr.t -> message_index:int -> bool +module Full : sig + type t = Tx_rollup_message_result_hash_repr.t list template + + val encoding : t Data_encoding.t + + val pp : Format.formatter -> t -> unit + + val compact : t -> Compact.t +end -module Index : Storage_description.INDEX with type t = Commitment_hash.t +module Index : Storage_description.INDEX with type t = 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 with its hash. *) type nonrec t = { - commitment : t; - commitment_hash : Commitment_hash.t; + commitment : Compact.t; + commitment_hash : Hash.t; committer : Signature.Public_key_hash.t; submitted_at : Raw_level_repr.t; finalized_at : Raw_level_repr.t option; 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 0d8c734869a7..8953508cc08d 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_commitment_storage.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_commitment_storage.ml @@ -28,6 +28,29 @@ open Tx_rollup_commitment_repr open Tx_rollup_errors_repr +let check_message_result {messages; _} result ~path ~index = + let computed = + match result with + | `Hash hash -> hash + | `Result result -> Tx_rollup_message_result_hash_repr.hash result + in + let cond = + match + Merkle.check_path + path + index + computed + messages.Tx_rollup_commitment_repr.Compact.root + with + | Ok x -> x + | Error _ -> false + in + error_unless + cond + Tx_rollup_errors_repr.( + Wrong_rejection_hash + {provided = computed; expected = `Valid_path (messages.root, index)}) + let adjust_unfinalized_commitments_count ctxt state tx_rollup pkh ~(dir : [`Incr | `Decr]) = let delta = match dir with `Incr -> 1 | `Decr -> -1 in @@ -72,9 +95,7 @@ let find : Tx_rollup_repr.t -> Tx_rollup_state_repr.t -> Tx_rollup_level_repr.t -> - (Raw_context.t * Tx_rollup_commitment_repr.Submitted_commitment.t option) - tzresult - Lwt.t = + (Raw_context.t * Submitted_commitment.t option) tzresult Lwt.t = fun ctxt tx_rollup state level -> if Tx_rollup_state_repr.has_valid_commitment_at state level then Storage.Tx_rollup.Commitment.find ctxt (level, tx_rollup) @@ -91,8 +112,7 @@ let get : Tx_rollup_repr.t -> Tx_rollup_state_repr.t -> Tx_rollup_level_repr.t -> - (Raw_context.t * Tx_rollup_commitment_repr.Submitted_commitment.t) tzresult - Lwt.t = + (Raw_context.t * Submitted_commitment.t) tzresult Lwt.t = fun ctxt tx_rollup state level -> find ctxt tx_rollup state level >>=? fun (ctxt, commitment) -> match commitment with @@ -105,8 +125,7 @@ let get_finalized : Tx_rollup_repr.t -> Tx_rollup_state_repr.t -> Tx_rollup_level_repr.t -> - (Raw_context.t * Tx_rollup_commitment_repr.Submitted_commitment.t) tzresult - Lwt.t = + (Raw_context.t * Submitted_commitment.t) tzresult Lwt.t = fun ctxt tx_rollup state level -> let window = Tx_rollup_state_repr.finalized_commitments_range state in (match window with @@ -145,8 +164,8 @@ let check_commitment_predecessor ctxt state commitment = ( commitment.predecessor, Tx_rollup_state_repr.next_commitment_predecessor state ) with - | (Some pred_hash, Some expected_hash) - when Commitment_hash.(pred_hash = expected_hash) -> + | (Some pred_hash, Some expected_hash) when Hash.(pred_hash = expected_hash) + -> return ctxt | (None, None) -> return ctxt | (provided, expected) -> fail (Wrong_predecessor_hash {provided; expected}) @@ -179,7 +198,8 @@ let add_commitment ctxt tx_rollup state pkh commitment = check_commitment_batches_and_merkle_root ctxt tx_rollup commitment >>=? fun ctxt -> (* Everything has been sorted out, let’s update the storage *) - let commitment_hash = Tx_rollup_commitment_repr.hash commitment in + let commitment = Tx_rollup_commitment_repr.Full.compact commitment in + let commitment_hash = Tx_rollup_commitment_repr.Compact.hash commitment in let submitted : Tx_rollup_commitment_repr.Submitted_commitment.t = { commitment; @@ -191,16 +211,9 @@ let add_commitment ctxt tx_rollup state pkh commitment = in Storage.Tx_rollup.Commitment.add ctxt (commitment.level, tx_rollup) submitted >>=? fun (ctxt, commitment_size_alloc, _) -> - let commitment_message_hash_preallocations = - List.length commitment.messages - * Tx_rollup_prefixes.message_result_hash.hash_size - in - let commitment_size_alloc_sans_preallocations = - commitment_size_alloc - commitment_message_hash_preallocations - in Tx_rollup_state_repr.adjust_storage_allocation state - ~delta:(Z.of_int commitment_size_alloc_sans_preallocations) + ~delta:(Z.of_int commitment_size_alloc) >>?= fun (state, paid_storage_size_diff_for_commitment) -> Tx_rollup_state_repr.record_commitment_creation state @@ -303,11 +316,7 @@ let remove_commitment ctxt rollup state = Tx_rollup_reveal_storage.remove ctxt rollup state tail >>=? fun (ctxt, state) -> (* We update the state *) - (match List.last_opt commitment.commitment.messages with - | Some hash -> ok hash - | None -> - error (Internal_error "empty commitments should not be possible")) - >>?= fun msg_hash -> + let msg_hash = commitment.commitment.messages.last_result_message_hash in Tx_rollup_state_repr.record_commitment_deletion state tail @@ -316,70 +325,57 @@ let remove_commitment ctxt rollup state = >>?= fun state -> return (ctxt, state, tail) | None -> fail No_commitment_to_remove -let get_nth_commitment commitment message_position = - let level = commitment.level in - Option.value_e - ~error: - (Error_monad.trace_of_error - (Wrong_message_position - { - level; - position = message_position; - length = List.length commitment.messages; - })) - (List.nth_opt commitment.messages message_position) - -let get_before_and_after_results ctxt tx_rollup - (submitted_commitment : Submitted_commitment.t) ~message_position state = +let check_agreed_and_disputed_results ctxt tx_rollup state + (submitted_commitment : Submitted_commitment.t) ~agreed_result + ~agreed_result_path ~disputed_result ~disputed_position + ~disputed_result_path = let commitment = submitted_commitment.commitment in - get_nth_commitment commitment message_position >>?= fun after_hash -> - let level = commitment.level in - if Compare.Int.(message_position = 0) then - match Tx_rollup_level_repr.pred level with - | None -> return (ctxt, Tx_rollup_message_result_hash_repr.init, after_hash) + Tx_rollup_state_repr.check_level_can_be_rejected state commitment.level + >>?= fun () -> + check_message_result + commitment + (`Hash disputed_result) + ~path:disputed_result_path + ~index:disputed_position + >>?= fun () -> + if Compare.Int.(disputed_position = 0) then + let agreed = Tx_rollup_message_result_hash_repr.hash agreed_result in + match Tx_rollup_level_repr.pred commitment.level with + | None -> + let expected = Tx_rollup_message_result_hash_repr.init in + fail_unless + Tx_rollup_message_result_hash_repr.(agreed = expected) + (Wrong_rejection_hash {provided = agreed; expected = `Hash expected}) + >>=? fun () -> return ctxt | Some pred_level -> ( Storage.Tx_rollup.Commitment.find ctxt (pred_level, tx_rollup) - >>=? function - | (ctxt, None) -> ( - (* In this case, the predecessor commitment is not stored. We need to - check a bunch of things to ensure that the last removed commitment - is a valid predecessor. - *) + >>=? fun (ctxt, candidate) -> + match candidate with + | Some commitment -> + let expected = + commitment.commitment.messages.last_result_message_hash + in fail_unless - (Option.is_none - (Tx_rollup_state_repr.finalized_commitment_oldest_level state)) - (Internal_error "Missing commitment predecessor") - >>=? fun () -> + Tx_rollup_message_result_hash_repr.(agreed = expected) + (Wrong_rejection_hash + {provided = agreed; expected = `Hash expected}) + >>=? fun () -> return ctxt + | None -> ( match Tx_rollup_state_repr.last_removed_commitment_hashes state with - | None -> fail (Internal_error "Missing last removed commitment") - | Some (message_commitment, commitment_hash) -> - Option.value_e - ~error: - (Error_monad.trace_of_error - (Internal_error - "Non-initial commitment has empty predecessor")) - commitment.predecessor - >>?= fun predecessor_commitment_hash -> + | Some (last_hash, _) -> fail_unless - (Commitment_hash.( = ) - predecessor_commitment_hash - commitment_hash) - (Internal_error - "Last removed commitment has wrong predecessor hash") - >>=? fun () -> return (ctxt, message_commitment, after_hash)) - | (ctxt, Some {commitment = {messages; _}; _}) -> - Option.value_e - ~error: - (Error_monad.trace_of_error (Internal_error "Empty commitment")) - (List.last_opt messages) - >>?= fun message_result -> return (ctxt, message_result, after_hash) - ) + Tx_rollup_message_result_hash_repr.(agreed = last_hash) + (Wrong_rejection_hash + {provided = agreed; expected = `Hash last_hash}) + >>=? fun () -> return ctxt + | None -> fail (Internal_error "Missing commitment predecessor"))) else - Storage.Tx_rollup.Commitment.get ctxt (level, tx_rollup) - >>=? fun (ctxt, submitted_commitment) -> - let commitment = submitted_commitment.commitment in - get_nth_commitment commitment (message_position - 1) >>?= fun before_hash -> - return (ctxt, before_hash, after_hash) + check_message_result + commitment + (`Result agreed_result) + ~path:agreed_result_path + ~index:(disputed_position - 1) + >>?= fun () -> return ctxt let reject_commitment ctxt rollup state level = Tx_rollup_state_repr.check_level_can_be_rejected state level >>?= fun () -> @@ -390,7 +386,7 @@ let reject_commitment ctxt rollup state level = let pred_hash = Option.map (fun (x : Submitted_commitment.t) -> - Tx_rollup_commitment_repr.hash x.commitment) + Tx_rollup_commitment_repr.Compact.hash x.commitment) pred_commitment in return (ctxt, pred_hash) 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 dde22eb7ce3b..4fd581d684bd 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_commitment_storage.mli +++ b/src/proto_alpha/lib_protocol/tx_rollup_commitment_storage.mli @@ -28,14 +28,13 @@ (** This module introduces various functions to manipulate the storage related to commitments for transaction rollups. *) -(** [check_commitment_level current_tezos_level state commitment] fails if [commitment] - does not target the expected level. *) -val check_commitment_level : - Raw_level_repr.t -> - Tx_rollup_state_repr.t -> - Tx_rollup_commitment_repr.t -> +val check_message_result : + Tx_rollup_commitment_repr.Compact.t -> + [ `Hash of Tx_rollup_message_result_hash_repr.t + | `Result of Tx_rollup_message_result_repr.t ] -> + path:Tx_rollup_commitment_repr.Merkle.path -> + index:int -> unit tzresult -(* FIXME: move in Tx_rollup_commitment_repr *) (** [add_commitment context tx_rollup contract commitment] adds a commitment to a rollup. It returns the new context, the new @@ -58,7 +57,7 @@ val add_commitment : Tx_rollup_repr.t -> Tx_rollup_state_repr.t -> Signature.Public_key_hash.t -> - Tx_rollup_commitment_repr.t -> + Tx_rollup_commitment_repr.Full.t -> (Raw_context.t * Tx_rollup_state_repr.t * Z.t) tzresult Lwt.t (** [remove_bond context state tx_rollup contract] removes the bond for an @@ -177,17 +176,14 @@ val reject_commitment : Tx_rollup_level_repr.t -> (Raw_context.t * Tx_rollup_state_repr.t) tzresult Lwt.t -(** [get_before_and_after_results tx_rollup commitment - ~message_position state] returns the before and after roots for a - given [message_position], from [commitment] on [tx_rollup]. *) -val get_before_and_after_results : +val check_agreed_and_disputed_results : Raw_context.t -> Tx_rollup_repr.t -> - Tx_rollup_commitment_repr.Submitted_commitment.t -> - message_position:int -> Tx_rollup_state_repr.t -> - (Raw_context.t - * Tx_rollup_message_result_hash_repr.t - * Tx_rollup_message_result_hash_repr.t) - tzresult - Lwt.t + Tx_rollup_commitment_repr.Submitted_commitment.t -> + agreed_result:Tx_rollup_message_result_repr.t -> + agreed_result_path:Tx_rollup_commitment_repr.Merkle.path -> + disputed_result:Tx_rollup_message_result_hash_repr.t -> + disputed_position:int -> + disputed_result_path:Tx_rollup_commitment_repr.Merkle.path -> + Raw_context.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 index 4cc796ba62d9..d22122514f95 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_errors_repr.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_errors_repr.ml @@ -50,8 +50,8 @@ type error += | No_commitment_to_remove | 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; + provided : Tx_rollup_commitment_repr.Hash.t option; + expected : Tx_rollup_commitment_repr.Hash.t option; } | Internal_error of string | Wrong_message_position of { @@ -59,8 +59,11 @@ type error += position : int; length : int; } - | Wrong_message_path_depth of {provided : int; limit : int} - | Wrong_withdraw_path_depth of {provided : int; limit : int} + | Wrong_path_depth of { + kind : [`Inbox | `Commitment]; + provided : int; + limit : int; + } | Wrong_message_path of {expected : Tx_rollup_inbox_repr.Merkle.root} | No_finalized_commitment_for_level of { level : Tx_rollup_level_repr.t; @@ -75,10 +78,11 @@ type error += provided : Tx_rollup_level_repr.t; accepted_range : (Tx_rollup_level_repr.t * Tx_rollup_level_repr.t) option; } - | Wrong_rejection_hashes of { - provided : Tx_rollup_message_result_repr.t; - computed : Tx_rollup_message_result_hash_repr.t; - expected : Tx_rollup_message_result_hash_repr.t; + | Wrong_rejection_hash of { + provided : Tx_rollup_message_result_hash_repr.t; + expected : + [ `Valid_path of Tx_rollup_commitment_repr.Merkle.h * int + | `Hash of Tx_rollup_message_result_hash_repr.t ]; } | Ticket_payload_size_limit_exceeded of {payload_size : int; limit : int} | Wrong_deposit_parameters @@ -87,6 +91,14 @@ type error += | Proof_invalid_before of {agreed : Context_hash.t; provided : Context_hash.t} | No_withdrawals_to_dispatch +let check_path_depth kind provided ~count_limit = + (* We assume that the Merkle_tree implemenation computes a tree in a + logarithmic size of the number of leaves. *) + let log2 n = Z.numbits (Z.of_int n) in + let limit = log2 count_limit in + error_when Compare.Int.(limit < provided) + @@ Wrong_path_depth {kind; provided; limit} + let () = let open Data_encoding in (* Tx_rollup_submit_batch_burn_exceeded *) @@ -307,12 +319,8 @@ let () = ~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))) + (req "provided" (option Tx_rollup_commitment_repr.Hash.encoding)) + (req "expected" (option Tx_rollup_commitment_repr.Hash.encoding))) (function | Wrong_predecessor_hash {provided; expected} -> Some (provided, expected) | _ -> None) @@ -378,32 +386,38 @@ let () = | _ -> None) (fun (level, position, length) -> Wrong_message_position {level; position; length}) ; - (* Wrong_message_path_depth *) + (* Wrong_path_depth *) register_error_kind `Permanent ~id:"tx_rollup_wrong_message_path_depth" ~title:"Wrong message path depth" ~description: - "The rejection contains a message path which exceeds the maximum depth \ - that can be witness for a valid inbox." - (obj2 (req "provided" int31) (req "limit" int31)) - (function - | Wrong_message_path_depth {provided; limit} -> Some (provided, limit) - | _ -> None) - (fun (provided, limit) -> Wrong_message_path_depth {provided; limit}) ; - (* Wrong_withdraw_path_depth *) - register_error_kind - `Permanent - ~id:"tx_rollup_wrong_withdraw_path_depth" - ~title:"Wrong withdraw path depth" - ~description: - "The rejection contains a withdraw path which exceeds the maximum depth \ - that can be witness for a valid message." - (obj2 (req "provided" int31) (req "limit" int31)) + "A path submitted as argument of this operation exceeds the maximum \ + depth that can be witnessed." + (obj3 + (req + "kind" + (union + [ + case + (Tag 0) + ~title:"Inbox" + (constant "inbox") + (function `Inbox -> Some () | _ -> None) + (fun () -> `Inbox); + case + (Tag 1) + ~title:"Commitment" + (constant "commitment") + (function `Commitment -> Some () | _ -> None) + (fun () -> `Commitment); + ])) + (req "provided" int31) + (req "limit" int31)) (function - | Wrong_withdraw_path_depth {provided; limit} -> Some (provided, limit) + | Wrong_path_depth {kind; provided; limit} -> Some (kind, provided, limit) | _ -> None) - (fun (provided, limit) -> Wrong_withdraw_path_depth {provided; limit}) ; + (fun (kind, provided, limit) -> Wrong_path_depth {kind; provided; limit}) ; (* Wrong_message_hash *) register_error_kind `Branch @@ -539,7 +553,7 @@ let () = | _ -> None) (fun (provided, accepted_range) -> Cannot_reject_level {provided; accepted_range}) ; - (* Wrong_rejection_hashes *) + (* Wrong_rejection_hash *) register_error_kind `Temporary ~id:"tx_rollup_wrong_rejection_hashes" @@ -549,16 +563,31 @@ let () = ~description: "The message result hash recomputed from the rejection argument is \ invalid" - (obj3 - (req "provided" Tx_rollup_message_result_repr.encoding) - (req "computed" Tx_rollup_message_result_hash_repr.encoding) - (req "expected" Tx_rollup_message_result_hash_repr.encoding)) + (obj2 + (req "provided" Tx_rollup_message_result_hash_repr.encoding) + (req + "expected" + (union + [ + case + (Tag 0) + ~title:"hash" + Tx_rollup_message_result_hash_repr.encoding + (function `Hash h -> Some h | _ -> None) + (fun h -> `Hash h); + case + (Tag 1) + ~title:"valid_path" + (obj2 + (req "root" Tx_rollup_commitment_repr.Merkle_hash.encoding) + (req "index" int31)) + (function `Valid_path (h, i) -> Some (h, i) | _ -> None) + (fun (h, i) -> `Valid_path (h, i)); + ]))) (function - | Wrong_rejection_hashes {provided; computed; expected} -> - Some (provided, computed, expected) + | Wrong_rejection_hash {provided; expected} -> Some (provided, expected) | _ -> None) - (fun (provided, computed, expected) -> - Wrong_rejection_hashes {provided; computed; expected}) ; + (fun (provided, expected) -> Wrong_rejection_hash {provided; expected}) ; (* ticket_payload_size_limit_exceeded *) register_error_kind `Permanent 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 0b953321bbc9..176c0e18a9ce 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_inbox_repr.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_inbox_repr.ml @@ -85,12 +85,6 @@ module Merkle = struct root tree end -let maximum_path_depth ~message_count_limit = - (* We assume that the Merkle_tree implemenation computes a tree in a - logarithmic size of the number of leaves. *) - let log2 n = Z.numbits (Z.of_int n) in - log2 message_count_limit - type t = {inbox_length : int; cumulated_size : int; merkle_root : Merkle.root} let ( = ) 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 5c488c243086..b4b58656b71e 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_inbox_repr.mli +++ b/src/proto_alpha/lib_protocol/tx_rollup_inbox_repr.mli @@ -65,11 +65,6 @@ module Merkle : sig val merklize_list : Tx_rollup_message_repr.hash list -> root end -(** [maximum_path_depth ~message_count_limit] returns the maximum - depth of a path, depending on the maximimum number of a message in - an inbox given by [message_count_limit]. *) -val maximum_path_depth : message_count_limit:int -> int - (** The view of 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 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 a16582f10c87..80b38e7daf1d 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_inbox_storage.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_inbox_storage.ml @@ -208,20 +208,9 @@ let append_message : (* Checks have passed, so we can actually record in the storage. *) Storage.Tx_rollup.Inbox.add (ctxt, tx_level) rollup new_inbox >>=? fun (ctxt, new_inbox_size_alloc, _) -> - (* To protect against spam, the message depositor pays upfront the - storage burn [commitment_message_hash_preallocation] that will be - require to commit this message in the future. - - In {!Tx_rollup_commitment_storage.add_commitment} we deduct the - total amount of pre-payed storage burn when calculating the - storage burn of adding the commitment. *) - let commitment_message_hash_preallocation = - Tx_rollup_prefixes.message_result_hash.hash_size - in Tx_rollup_state_repr.adjust_storage_allocation new_state - ~delta: - (Z.of_int (new_inbox_size_alloc + commitment_message_hash_preallocation)) + ~delta:Z.(of_int new_inbox_size_alloc) >>?= fun (new_state, paid_storage_space_diff) -> return ( ctxt, diff --git a/src/proto_alpha/lib_protocol/tx_rollup_prefixes.ml b/src/proto_alpha/lib_protocol/tx_rollup_prefixes.ml index c464fe77021b..2d4fa2061a60 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_prefixes.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_prefixes.ml @@ -80,6 +80,14 @@ let message_result_hash = b58check_size = 54; } +let message_result_list_hash = + { + b58check_prefix = "\079\146\082"; + prefix = "txM"; + hash_size = 32; + b58check_size = 53; + } + let withdraw_list_hash = { b58check_prefix = "\079\150\072"; diff --git a/src/proto_alpha/lib_protocol/tx_rollup_prefixes.mli b/src/proto_alpha/lib_protocol/tx_rollup_prefixes.mli index bccca0173a97..34efcbac8ab4 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_prefixes.mli +++ b/src/proto_alpha/lib_protocol/tx_rollup_prefixes.mli @@ -48,6 +48,9 @@ val commitment_hash : t (** See {!Tx_rollup_commitment_repr}. *) val message_result_hash : t +(** See {!Tx_rollup_message_result_repr.Merkle}. *) +val message_result_list_hash : t + (** See {!Tx_rollup_withdraw_repr}. *) val withdraw_list_hash : t 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 cf9e880183da..3d766bcf6734 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_state_repr.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_state_repr.ml @@ -148,13 +148,12 @@ let pp_range fmt = function *) type t = { last_removed_commitment_hashes : - (Tx_rollup_message_result_hash_repr.t - * Tx_rollup_commitment_repr.Commitment_hash.t) + (Tx_rollup_message_result_hash_repr.t * Tx_rollup_commitment_repr.Hash.t) option; finalized_commitments : range; unfinalized_commitments : range; uncommitted_inboxes : range; - commitment_newest_hash : Tx_rollup_commitment_repr.Commitment_hash.t option; + commitment_newest_hash : Tx_rollup_commitment_repr.Hash.t option; tezos_head_level : Raw_level_repr.t option; burn_per_byte : Tez_repr.t; inbox_ema : int; @@ -276,15 +275,13 @@ let encoding : t Data_encoding.t = (req "last_message_hash" Tx_rollup_message_result_hash_repr.encoding) - (req - "commitment_hash" - Tx_rollup_commitment_repr.Commitment_hash.encoding))) + (req "commitment_hash" Tx_rollup_commitment_repr.Hash.encoding))) (req "finalized_commitments" range_encoding) (req "unfinalized_commitments" range_encoding) (req "uncommitted_inboxes" range_encoding) (req "commitment_newest_hash" - (option Tx_rollup_commitment_repr.Commitment_hash.encoding)) + (option Tx_rollup_commitment_repr.Hash.encoding)) (req "tezos_head_level" (option Raw_level_repr.encoding)) (req "burn_per_byte" Tez_repr.encoding) (req "allocated_storage" n) @@ -321,7 +318,7 @@ let pp fmt unfinalized_commitments pp_range uncommitted_inboxes - (pp_print_option Tx_rollup_commitment_repr.Commitment_hash.pp) + (pp_print_option Tx_rollup_commitment_repr.Hash.pp) commitment_newest_hash (pp_print_option Raw_level_repr.pp) tezos_head_level @@ -331,7 +328,7 @@ let pp fmt "(message result: %a, commitment: %a)" Tx_rollup_message_result_hash_repr.pp m - Tx_rollup_commitment_repr.Commitment_hash.pp + Tx_rollup_commitment_repr.Hash.pp c)) last_removed_commitment_hashes Z.pp_print @@ -617,12 +614,11 @@ module Internal_for_tests = struct ?burn_per_byte:Tez_repr.t -> ?inbox_ema:int -> ?last_removed_commitment_hashes: - Tx_rollup_message_result_hash_repr.t - * Tx_rollup_commitment_repr.Commitment_hash.t -> + Tx_rollup_message_result_hash_repr.t * Tx_rollup_commitment_repr.Hash.t -> ?finalized_commitments:Tx_rollup_level_repr.t * Tx_rollup_level_repr.t -> ?unfinalized_commitments:Tx_rollup_level_repr.t * Tx_rollup_level_repr.t -> ?uncommitted_inboxes:Tx_rollup_level_repr.t * Tx_rollup_level_repr.t -> - ?commitment_newest_hash:Tx_rollup_commitment_repr.Commitment_hash.t -> + ?commitment_newest_hash:Tx_rollup_commitment_repr.Hash.t -> ?tezos_head_level:Raw_level_repr.t -> ?occupied_storage:Z.t -> allocated_storage:Z.t -> 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 e67fd15d3515..80c9f3231d44 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_state_repr.mli +++ b/src/proto_alpha/lib_protocol/tx_rollup_state_repr.mli @@ -118,8 +118,7 @@ val next_commitment_level : (** [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 +val next_commitment_predecessor : t -> Tx_rollup_commitment_repr.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 @@ -149,10 +148,7 @@ val record_inbox_deletion : t -> Tx_rollup_level_repr.t -> t tzresult 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 + t -> Tx_rollup_level_repr.t -> Tx_rollup_commitment_repr.Hash.t -> t tzresult (** [record_commitment_rejection state level pred_hash] updates [state] to take into account the fact that the commitment for the @@ -165,7 +161,7 @@ val record_commitment_creation : val record_commitment_rejection : t -> Tx_rollup_level_repr.t -> - Tx_rollup_commitment_repr.Commitment_hash.t option -> + Tx_rollup_commitment_repr.Hash.t option -> t tzresult (** [record_commitment_deletion state level msg_hash commitment_hash] @@ -178,7 +174,7 @@ val record_commitment_rejection : val record_commitment_deletion : t -> Tx_rollup_level_repr.t -> - Tx_rollup_commitment_repr.Commitment_hash.t -> + Tx_rollup_commitment_repr.Hash.t -> Tx_rollup_message_result_hash_repr.t -> t tzresult @@ -200,8 +196,7 @@ val check_level_can_be_rejected : t -> Tx_rollup_level_repr.t -> unit tzresult hash and the last commitment hash. *) val last_removed_commitment_hashes : t -> - (Tx_rollup_message_result_hash_repr.t - * Tx_rollup_commitment_repr.Commitment_hash.t) + (Tx_rollup_message_result_hash_repr.t * Tx_rollup_commitment_repr.Hash.t) option (** [head_levels state] returns the level of the last inbox which has @@ -232,12 +227,11 @@ module Internal_for_tests : sig ?burn_per_byte:Tez_repr.t -> ?inbox_ema:int -> ?last_removed_commitment_hashes: - Tx_rollup_message_result_hash_repr.t - * Tx_rollup_commitment_repr.Commitment_hash.t -> + Tx_rollup_message_result_hash_repr.t * Tx_rollup_commitment_repr.Hash.t -> ?finalized_commitments:Tx_rollup_level_repr.t * Tx_rollup_level_repr.t -> ?unfinalized_commitments:Tx_rollup_level_repr.t * Tx_rollup_level_repr.t -> ?uncommitted_inboxes:Tx_rollup_level_repr.t * Tx_rollup_level_repr.t -> - ?commitment_newest_hash:Tx_rollup_commitment_repr.Commitment_hash.t -> + ?commitment_newest_hash:Tx_rollup_commitment_repr.Hash.t -> ?tezos_head_level:Raw_level_repr.t -> ?occupied_storage:Z.t -> allocated_storage:Z.t -> -- GitLab From 674c2771d109cd8ad057cda1b0c1732e24448579 Mon Sep 17 00:00:00 2001 From: Thomas Letan Date: Mon, 28 Mar 2022 18:32:35 +0200 Subject: [PATCH 08/20] Proto,tx_rollup: Remove unused errors --- .../lib_protocol/tx_rollup_message_repr.ml | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/src/proto_alpha/lib_protocol/tx_rollup_message_repr.ml b/src/proto_alpha/lib_protocol/tx_rollup_message_repr.ml index dd0e56646a72..bb0a7d57f0ec 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_message_repr.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_message_repr.ml @@ -146,24 +146,3 @@ let hash_uncarbonated msg = Message_hash.hash_bytes [Data_encoding.Binary.to_bytes_exn encoding msg] let hash_equal = Message_hash.equal - -type error += Negative_message_index of int | Too_big_message_index of int - -let () = - let open Data_encoding in - register_error_kind - `Permanent - ~id:"tx_rollup_negative_message_index" - ~title:"The message index must be non-negative" - ~description:"The message index must be non-negative" - (obj1 (req "message_position" int31)) - (function Negative_message_index i -> Some i | _ -> None) - (fun i -> Negative_message_index i) ; - register_error_kind - `Permanent - ~id:"tx_rollup_invalid_message_argument" - ~title:"The message index must be less than 64" - ~description:"The message index must be less than 64" - (obj1 (req "message_position" int31)) - (function Too_big_message_index i -> Some i | _ -> None) - (fun i -> Too_big_message_index i) -- GitLab From 89e1ada1b72ee7f99009c8fa673577d7d8e29289 Mon Sep 17 00:00:00 2001 From: Thomas Letan Date: Mon, 28 Mar 2022 11:13:02 +0200 Subject: [PATCH 09/20] Proto,tx_rollup: Rework storage burn to leverage merklized commitments --- src/proto_alpha/lib_client/injection.ml | 13 ++-- .../lib_client/operation_result.ml | 19 ++---- .../lib_protocol/alpha_context.mli | 13 ++-- src/proto_alpha/lib_protocol/apply.ml | 31 +++------ src/proto_alpha/lib_protocol/apply_results.ml | 54 ++++----------- .../lib_protocol/apply_results.mli | 2 - .../integration/operations/test_tx_rollup.ml | 44 ++++-------- .../tx_rollup_commitment_storage.ml | 68 +++++++++---------- .../tx_rollup_commitment_storage.mli | 13 ++-- .../lib_protocol/tx_rollup_reveal_storage.ml | 20 +++--- .../lib_protocol/tx_rollup_reveal_storage.mli | 11 +-- 11 files changed, 98 insertions(+), 190 deletions(-) diff --git a/src/proto_alpha/lib_client/injection.ml b/src/proto_alpha/lib_client/injection.ml index a46ab2c0ad58..71991887af07 100644 --- a/src/proto_alpha/lib_client/injection.ml +++ b/src/proto_alpha/lib_client/injection.ml @@ -385,18 +385,17 @@ let estimated_storage_single (type kind) ~tx_rollup_origination_size Ok size_of_constant | Applied (Set_deposits_limit_result _) -> Ok Z.zero | Applied (Tx_rollup_origination_result _) -> Ok tx_rollup_origination_size - | Applied (Tx_rollup_submit_batch_result _) -> - (* TODO: https://gitlab.com/tezos/tezos/-/issues/2339 - We need to charge for newly allocated storage (as we do for - Michelson’s big map). *) - Ok Z.zero + | Applied (Tx_rollup_submit_batch_result {paid_storage_size_diff; _}) -> + Ok paid_storage_size_diff | Applied (Tx_rollup_commit_result _) -> Ok Z.zero | Applied (Tx_rollup_return_bond_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 (Tx_rollup_dispatch_tickets_result _) -> Ok Z.zero - | Applied (Transfer_ticket_result _) -> Ok Z.zero + | Applied (Tx_rollup_dispatch_tickets_result {paid_storage_size_diff; _}) -> + Ok paid_storage_size_diff + | Applied (Transfer_ticket_result {paid_storage_size_diff; _}) -> + Ok paid_storage_size_diff | Applied (Sc_rollup_originate_result {size; _}) -> Ok size | Applied (Sc_rollup_add_messages_result _) -> Ok Z.zero (* The following Sc_rollup operations have zero storage cost because we diff --git a/src/proto_alpha/lib_client/operation_result.ml b/src/proto_alpha/lib_client/operation_result.ml index 6cdf3a753a37..9b307d950be3 100644 --- a/src/proto_alpha/lib_client/operation_result.ml +++ b/src/proto_alpha/lib_client/operation_result.ml @@ -569,19 +569,13 @@ let pp_manager_operation_contents_and_result ppf (Z.to_string paid_storage_size_diff) in let pp_tx_rollup_commit_result - (Tx_rollup_commit_result - {balance_updates; consumed_gas; paid_storage_size_diff}) = + (Tx_rollup_commit_result {balance_updates; consumed_gas}) = Format.fprintf ppf "@,Balance updates:@, %a" pp_balance_updates balance_updates ; - Format.fprintf ppf "@,Consumed gas: %a" Gas.Arith.pp consumed_gas ; - if paid_storage_size_diff <> Z.zero then - Format.fprintf - ppf - "@,Paid storage size diff: %s bytes" - (Z.to_string paid_storage_size_diff) + Format.fprintf ppf "@,Consumed gas: %a" Gas.Arith.pp consumed_gas in let pp_tx_rollup_return_bond_result (Tx_rollup_return_bond_result {balance_updates; consumed_gas}) = @@ -594,19 +588,14 @@ let pp_manager_operation_contents_and_result ppf in let pp_tx_rollup_finalize_commitment_result (Tx_rollup_finalize_commitment_result - {balance_updates; consumed_gas; level; paid_storage_size_diff}) = + {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 ; - if paid_storage_size_diff <> Z.zero then - Format.fprintf - ppf - "@,Paid storage size diff: %s bytes" - (Z.to_string paid_storage_size_diff) + Format.fprintf ppf "@finalized level:@, %a" Tx_rollup_level.pp level in let pp_tx_rollup_remove_commitment_result (Tx_rollup_remove_commitment_result diff --git a/src/proto_alpha/lib_protocol/alpha_context.mli b/src/proto_alpha/lib_protocol/alpha_context.mli index 5c5704a14b1e..b1a720b1e799 100644 --- a/src/proto_alpha/lib_protocol/alpha_context.mli +++ b/src/proto_alpha/lib_protocol/alpha_context.mli @@ -1786,10 +1786,9 @@ module Tx_rollup_reveal : sig val record : context -> Tx_rollup.t -> - Tx_rollup_state.t -> Tx_rollup_level.t -> message_position:int -> - (context * Tx_rollup_state.t * Z.t) tzresult Lwt.t + context tzresult Lwt.t val mem : context -> @@ -1799,11 +1798,7 @@ module Tx_rollup_reveal : sig (context * bool) tzresult Lwt.t val remove : - context -> - Tx_rollup.t -> - Tx_rollup_state.t -> - Tx_rollup_level.t -> - (context * Tx_rollup_state_repr.t) tzresult Lwt.t + context -> Tx_rollup.t -> Tx_rollup_level.t -> context tzresult Lwt.t end (** This module re-exports definitions from {!Tx_rollup_message_repr}. *) @@ -1977,7 +1972,7 @@ module Tx_rollup_commitment : sig Tx_rollup_state.t -> Signature.public_key_hash -> Full.t -> - (context * Tx_rollup_state.t * Z.t) tzresult Lwt.t + (context * Tx_rollup_state.t) tzresult Lwt.t val find : context -> @@ -2028,7 +2023,7 @@ module Tx_rollup_commitment : sig context -> Tx_rollup.t -> Tx_rollup_state.t -> - (context * Tx_rollup_state.t * Tx_rollup_level.t * Z.t) tzresult Lwt.t + (context * Tx_rollup_state.t * Tx_rollup_level.t) tzresult Lwt.t val remove_commitment : context -> diff --git a/src/proto_alpha/lib_protocol/apply.ml b/src/proto_alpha/lib_protocol/apply.ml index f1c545d9dffe..7067b731c029 100644 --- a/src/proto_alpha/lib_protocol/apply.ml +++ b/src/proto_alpha/lib_protocol/apply.ml @@ -1335,10 +1335,9 @@ let apply_external_manager_operation_content : Tx_rollup_reveal.record ctxt tx_rollup - state level ~message_position:message_index - >>=? fun (ctxt, state, reveal_diff) -> + >>=? fun ctxt -> let adjust_ticket_balance (ctxt, state, acc_diff) ( Tx_rollup_withdraw. {claimer; amount; ticket_hash = tx_rollup_ticket_hash}, @@ -1358,7 +1357,7 @@ let apply_external_manager_operation_content : in List.fold_left_es adjust_ticket_balance - (ctxt, state, reveal_diff) + (ctxt, state, Z.zero) rev_ex_token_and_hash_list >>=? fun (ctxt, state, paid_storage_size_diff) -> Tx_rollup_state.update ctxt tx_rollup state >>=? fun ctxt -> @@ -1552,14 +1551,13 @@ let apply_external_manager_operation_content : else return (ctxt, []) ) >>=? fun (ctxt, balance_updates) -> Tx_rollup_commitment.add_commitment ctxt tx_rollup state source commitment - >>=? fun (ctxt, state, paid_storage_size_diff) -> + >>=? fun (ctxt, state) -> Tx_rollup_state.update ctxt tx_rollup state >>=? fun ctxt -> let result = Tx_rollup_commit_result { consumed_gas = Gas.consumed ~since:before_operation ~until:ctxt; balance_updates; - paid_storage_size_diff; } in return (ctxt, result, []) @@ -1585,7 +1583,7 @@ let apply_external_manager_operation_content : | 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, paid_storage_size_diff) -> + >>=? fun (ctxt, state, level) -> Tx_rollup_state.update ctxt tx_rollup state >>=? fun ctxt -> let result = Tx_rollup_finalize_commitment_result @@ -1593,7 +1591,6 @@ let apply_external_manager_operation_content : consumed_gas = Gas.consumed ~since:before_operation ~until:ctxt; balance_updates = []; level; - paid_storage_size_diff; } in return (ctxt, result, []) @@ -2033,7 +2030,8 @@ let burn_storage_fees : storage_limit, Tx_rollup_origination_result {payload with balance_updates} ) | Tx_rollup_return_bond_result _ | Tx_rollup_remove_commitment_result _ - | Tx_rollup_rejection_result _ | Tx_rollup_dispatch_tickets_result _ -> + | Tx_rollup_rejection_result _ | Tx_rollup_finalize_commitment_result _ + | Tx_rollup_commit_result _ -> return (ctxt, storage_limit, smopr) | Transfer_ticket_result payload -> let consumed = payload.paid_storage_size_diff in @@ -2044,16 +2042,7 @@ let burn_storage_fees : ( ctxt, storage_limit, Transfer_ticket_result {payload with balance_updates} ) - | Tx_rollup_finalize_commitment_result payload -> - let consumed = payload.paid_storage_size_diff in - Fees.burn_storage_fees ctxt ~storage_limit ~payer consumed - >>=? fun (ctxt, storage_limit, storage_bus) -> - let balance_updates = storage_bus @ payload.balance_updates in - return - ( ctxt, - storage_limit, - Tx_rollup_finalize_commitment_result {payload with balance_updates} ) - | Tx_rollup_commit_result payload -> + | Tx_rollup_submit_batch_result payload -> let consumed = payload.paid_storage_size_diff in Fees.burn_storage_fees ctxt ~storage_limit ~payer consumed >>=? fun (ctxt, storage_limit, storage_bus) -> @@ -2061,8 +2050,8 @@ let burn_storage_fees : return ( ctxt, storage_limit, - Tx_rollup_commit_result {payload with balance_updates} ) - | Tx_rollup_submit_batch_result payload -> + Tx_rollup_submit_batch_result {payload with balance_updates} ) + | Tx_rollup_dispatch_tickets_result payload -> let consumed = payload.paid_storage_size_diff in Fees.burn_storage_fees ctxt ~storage_limit ~payer consumed >>=? fun (ctxt, storage_limit, storage_bus) -> @@ -2070,7 +2059,7 @@ let burn_storage_fees : return ( ctxt, storage_limit, - Tx_rollup_submit_batch_result {payload with balance_updates} ) + Tx_rollup_dispatch_tickets_result {payload with balance_updates} ) | Sc_rollup_originate_result payload -> Fees.burn_sc_rollup_origination_fees ctxt diff --git a/src/proto_alpha/lib_protocol/apply_results.ml b/src/proto_alpha/lib_protocol/apply_results.ml index cf8496975365..065e5d6c4f0c 100644 --- a/src/proto_alpha/lib_protocol/apply_results.ml +++ b/src/proto_alpha/lib_protocol/apply_results.ml @@ -158,7 +158,6 @@ type _ successful_manager_operation_result = | Tx_rollup_commit_result : { balance_updates : Receipt.balance_updates; consumed_gas : Gas.Arith.fp; - paid_storage_size_diff : Z.t; } -> Kind.tx_rollup_commit successful_manager_operation_result | Tx_rollup_return_bond_result : { @@ -170,7 +169,6 @@ type _ successful_manager_operation_result = balance_updates : Receipt.balance_updates; consumed_gas : Gas.Arith.fp; level : Tx_rollup_level.t; - paid_storage_size_diff : Z.t; } -> Kind.tx_rollup_finalize_commitment successful_manager_operation_result | Tx_rollup_remove_commitment_result : { @@ -669,34 +667,21 @@ module Manager_result = struct ~op_case:Operation.Encoding.Manager_operations.tx_rollup_commit_case ~encoding: Data_encoding.( - obj4 + obj3 (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 "paid_storage_size_diff" n)) + (dft "consumed_milligas" Gas.Arith.n_fp_encoding Gas.Arith.zero)) ~select:(function | Successful_manager_result (Tx_rollup_commit_result _ as op) -> Some op | _ -> None) ~kind:Kind.Tx_rollup_commit_manager_kind ~proj:(function - | Tx_rollup_commit_result - {balance_updates; consumed_gas; paid_storage_size_diff} -> - ( balance_updates, - Gas.Arith.ceil consumed_gas, - consumed_gas, - paid_storage_size_diff )) - ~inj: - (fun ( balance_updates, - consumed_gas, - consumed_milligas, - paid_storage_size_diff ) -> + | Tx_rollup_commit_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_commit_result - { - balance_updates; - consumed_gas = consumed_milligas; - paid_storage_size_diff; - }) + {balance_updates; consumed_gas = consumed_milligas}) let[@coq_axiom_with_reason "gadt"] tx_rollup_return_bond_case = make @@ -726,12 +711,11 @@ module Manager_result = struct Operation.Encoding.Manager_operations.tx_rollup_finalize_commitment_case ~encoding: Data_encoding.( - obj5 + 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) - (req "paid_storage_size_diff" n)) + (req "level" Tx_rollup_level.encoding)) ~select:(function | Successful_manager_result (Tx_rollup_finalize_commitment_result _ as op) -> @@ -740,26 +724,12 @@ module Manager_result = struct ~kind:Kind.Tx_rollup_finalize_commitment_manager_kind ~proj:(function | Tx_rollup_finalize_commitment_result - {balance_updates; consumed_gas; level; paid_storage_size_diff} -> - ( balance_updates, - Gas.Arith.ceil consumed_gas, - consumed_gas, - level, - paid_storage_size_diff )) - ~inj: - (fun ( balance_updates, - consumed_gas, - consumed_milligas, - level, - paid_storage_size_diff ) -> + {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; - paid_storage_size_diff; - }) + {balance_updates; consumed_gas = consumed_milligas; level}) let[@coq_axiom_with_reason "gadt"] tx_rollup_remove_commitment_case = make diff --git a/src/proto_alpha/lib_protocol/apply_results.mli b/src/proto_alpha/lib_protocol/apply_results.mli index b7d476a17b28..cea567bab634 100644 --- a/src/proto_alpha/lib_protocol/apply_results.mli +++ b/src/proto_alpha/lib_protocol/apply_results.mli @@ -214,7 +214,6 @@ and _ successful_manager_operation_result = | Tx_rollup_commit_result : { balance_updates : Receipt.balance_updates; consumed_gas : Gas.Arith.fp; - paid_storage_size_diff : Z.t; } -> Kind.tx_rollup_commit successful_manager_operation_result | Tx_rollup_return_bond_result : { @@ -226,7 +225,6 @@ and _ successful_manager_operation_result = balance_updates : Receipt.balance_updates; consumed_gas : Gas.Arith.fp; level : Tx_rollup_level.t; - paid_storage_size_diff : Z.t; } -> Kind.tx_rollup_finalize_commitment successful_manager_operation_result | Tx_rollup_remove_commitment_result : { 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 7446129c58a5..4dd4d4abdd9a 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 @@ -1656,35 +1656,9 @@ let test_storage_burn_for_commitment () = Op.tx_rollup_commit (I i) contract tx_rollup commitment >>=? fun op -> Incremental.add_operation i op >>=? fun i -> occupied_storage_size (I i) tx_rollup >>=? fun storage_size_after_commit -> - (* extra space should be allocated for submitting commitment *) - let compact_commitment = Tx_rollup_commitment.Full.compact commitment in - let commitment_add_delta = - (* dummy values for the [Submitted_commitment] because we only - care about the size *) - Data_encoding.Binary.length - Tx_rollup_commitment.Submitted_commitment.encoding - { - commitment = compact_commitment; - commitment_hash = Tx_rollup_commitment.Compact.hash compact_commitment; - committer = is_implicit_exn contract; - submitted_at = Raw_level.root; - finalized_at = None; - } - in - let commitment_remove_delta = - (* dummy values for the [Submitted_commitment] because we only - care about the size *) - Data_encoding.Binary.length - Tx_rollup_commitment.Submitted_commitment.encoding - { - commitment = compact_commitment; - commitment_hash = Tx_rollup_commitment.Compact.hash compact_commitment; - committer = is_implicit_exn contract; - submitted_at = Raw_level.root; - (* It was finalized *) - finalized_at = Some Raw_level.root; - } - in + (* no storage burn for commitment because of the bond *) + let commitment_add_delta = 0 in + let commitment_remove_delta = 0 in check_storage_delta ~__POS__ "Size increase after adding commitment" @@ -1696,7 +1670,17 @@ let test_storage_burn_for_commitment () = Op.tx_rollup_finalize (B b) contract tx_rollup >>=? fun op -> Block.bake ~operation:op b >>=? fun b -> occupied_storage_size (B b) tx_rollup >>=? fun freed_space_after_finalize -> - let inbox_delta = -36 in + let inbox_delta = + -1 + * Data_encoding.Binary.length + Tx_rollup_inbox.encoding + Tx_rollup_inbox. + { + cumulated_size = 0; + inbox_length = 0; + merkle_root = Merkle.merklize_list []; + } + in check_storage_delta ~__POS__ "Storage space is freed after finalize" 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 8953508cc08d..eaeff7a31a6d 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_commitment_storage.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_commitment_storage.ml @@ -28,6 +28,20 @@ open Tx_rollup_commitment_repr open Tx_rollup_errors_repr +(* + + {{Note}} The functions of this module ignore storage allocations on + purposes. This is because any storage allocated here is done under + the condition that a user has agreed to freeze a significant bond + of tez. + + Not only this bond covers the maximum number of bytes a transaction + rollup can allocate, but it can be recovered iff the storage + associated with this bond is deallocated. In other word, rollup + operators have an incentive to keep the storage clean. + + *) + let check_message_result {messages; _} result ~path ~index = let computed = match result with @@ -51,8 +65,7 @@ let check_message_result {messages; _} result ~path ~index = Wrong_rejection_hash {provided = computed; expected = `Valid_path (messages.root, index)}) -let adjust_unfinalized_commitments_count ctxt state tx_rollup pkh - ~(dir : [`Incr | `Decr]) = +let adjust_commitments_count ctxt tx_rollup pkh ~(dir : [`Incr | `Decr]) = let delta = match dir with `Incr -> 1 | `Decr -> -1 in let bond_key = (tx_rollup, pkh) in Storage.Tx_rollup.Commitment_bond.find ctxt bond_key @@ -63,7 +76,7 @@ let adjust_unfinalized_commitments_count ctxt state tx_rollup pkh fail_when Compare.Int.(count < 0) (Commitment_bond_negative count) >>=? fun () -> Storage.Tx_rollup.Commitment_bond.add ctxt bond_key count - >>=? fun (ctxt, _, _) -> return (ctxt, state) + >>=? fun (ctxt, _, _) -> return ctxt let remove_bond : Raw_context.t -> @@ -210,19 +223,15 @@ let add_commitment ctxt tx_rollup state pkh commitment = } in Storage.Tx_rollup.Commitment.add ctxt (commitment.level, tx_rollup) submitted - >>=? fun (ctxt, commitment_size_alloc, _) -> - Tx_rollup_state_repr.adjust_storage_allocation - state - ~delta:(Z.of_int commitment_size_alloc) - >>?= fun (state, paid_storage_size_diff_for_commitment) -> + >>=? fun (ctxt, _commitment_size_alloc, _) -> + (* See {{Note}} for a rationale on why ignoring storage allocation is safe. *) Tx_rollup_state_repr.record_commitment_creation state commitment.level commitment_hash >>?= fun state -> - adjust_unfinalized_commitments_count ctxt state tx_rollup pkh ~dir:`Incr - >>=? fun (ctxt, state) -> - return (ctxt, state, paid_storage_size_diff_for_commitment) + adjust_commitments_count ctxt tx_rollup pkh ~dir:`Incr >>=? fun ctxt -> + return (ctxt, state) let pending_bonded_commitments : Raw_context.t -> @@ -256,14 +265,6 @@ let finalize_commitment ctxt rollup state = 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 - state - rollup - commitment.committer - ~dir:`Decr - >>=? fun (ctxt, state) -> (* We remove the inbox *) Tx_rollup_inbox_storage.remove ctxt oldest_inbox_level rollup state >>=? fun (ctxt, state) -> @@ -272,16 +273,12 @@ let finalize_commitment ctxt rollup state = ctxt (oldest_inbox_level, rollup) {commitment with finalized_at = Some current_level} - >>=? fun (ctxt, commitment_size_alloc) -> - Tx_rollup_state_repr.adjust_storage_allocation - state - ~delta:(Z.of_int commitment_size_alloc) - >>?= fun (state, paid_storage_size_diff_for_commitment) -> + >>=? fun (ctxt, _commitment_size_alloc) -> + (* See {{Note}} for a rationale on why ignoring storage + allocation is safe. *) (* We update the state *) Tx_rollup_state_repr.record_inbox_deletion state oldest_inbox_level - >>?= fun state -> - return - (ctxt, state, oldest_inbox_level, paid_storage_size_diff_for_commitment) + >>?= fun state -> return (ctxt, state, oldest_inbox_level) | None -> fail No_commitment_to_finalize let remove_commitment ctxt rollup state = @@ -303,18 +300,15 @@ let remove_commitment ctxt rollup state = (* unreachable code if the implementation is correct *) fail (Internal_error "Missing finalized_at field")) >>=? fun () -> + (* Decrement the bond count of the committer *) + adjust_commitments_count ctxt rollup commitment.committer ~dir:`Decr + >>=? fun ctxt -> (* We remove the commitment *) Storage.Tx_rollup.Commitment.remove ctxt (tail, rollup) - >>=? fun (ctxt, freed_size, _existed) -> - (* When we free storage space and adjust storage - allocation, the returned [_paid_storage_size_diff] - is always 0 and can thus safely be ignored. *) - Tx_rollup_state_repr.adjust_storage_allocation - state - ~delta:(Z.of_int freed_size |> Z.neg) - >>?= fun (state, _paid_storage_size_diff) -> - Tx_rollup_reveal_storage.remove ctxt rollup state tail - >>=? fun (ctxt, state) -> + >>=? fun (ctxt, _freed_size, _existed) -> + (* See {{Note}} for a rationale on why ignoring storage + allocation is safe. *) + Tx_rollup_reveal_storage.remove ctxt rollup tail >>=? fun ctxt -> (* We update the state *) let msg_hash = commitment.commitment.messages.last_result_message_hash in Tx_rollup_state_repr.record_commitment_deletion 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 4fd581d684bd..2344a6d2ccb9 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_commitment_storage.mli +++ b/src/proto_alpha/lib_protocol/tx_rollup_commitment_storage.mli @@ -37,8 +37,8 @@ val check_message_result : unit tzresult (** [add_commitment context tx_rollup contract commitment] adds a - commitment to a rollup. It returns the new context, the new - state, and the storage size diff. + commitment to a rollup. It returns the new context, and the new + state. This function returns the errors @@ -58,7 +58,7 @@ val add_commitment : Tx_rollup_state_repr.t -> Signature.Public_key_hash.t -> Tx_rollup_commitment_repr.Full.t -> - (Raw_context.t * Tx_rollup_state_repr.t * Z.t) tzresult Lwt.t + (Raw_context.t * Tx_rollup_state_repr.t) tzresult Lwt.t (** [remove_bond context state tx_rollup contract] removes the bond for an implicit contract. This will fail if either the bond does not exist, @@ -142,14 +142,13 @@ val has_bond : 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. This function returns the new context, the new - state, and the storage size diff. *) + from the context. This function returns the new context, and the + new state. *) val finalize_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 * Z.t) - tzresult + (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 diff --git a/src/proto_alpha/lib_protocol/tx_rollup_reveal_storage.ml b/src/proto_alpha/lib_protocol/tx_rollup_reveal_storage.ml index 14659d7095e3..795f723ff864 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_reveal_storage.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_reveal_storage.ml @@ -25,7 +25,7 @@ (* *) (*****************************************************************************) -let record ctxt tx_rollup state level ~message_position = +let record ctxt tx_rollup level ~message_position = Storage.Tx_rollup.Revealed_withdrawals.find (ctxt, level) tx_rollup >>=? fun (ctxt, revealed_withdrawals_opt) -> Bitset.add @@ -36,11 +36,9 @@ let record ctxt tx_rollup state level ~message_position = (ctxt, level) tx_rollup revealed_withdrawals - >>=? fun (ctxt, new_size, _is_new) -> - Tx_rollup_state_repr.adjust_storage_allocation - state - ~delta:(Z.of_int new_size) - >>?= fun (state, diff) -> return (ctxt, state, diff) + >>=? fun (ctxt, _new_size, _is_new) -> return ctxt +(* See {{Note}} in [Tx_rollup_commitment_storage] for a rationale on + why ignoring storage allocation is safe. *) let mem ctxt tx_rollup level ~message_position = Storage.Tx_rollup.Revealed_withdrawals.find (ctxt, level) tx_rollup @@ -50,10 +48,8 @@ let mem ctxt tx_rollup level ~message_position = Bitset.mem field message_position >>?= fun res -> return (ctxt, res) | None -> return (ctxt, false) -let remove ctxt tx_rollup state level = +let remove ctxt tx_rollup level = Storage.Tx_rollup.Revealed_withdrawals.remove (ctxt, level) tx_rollup - >>=? fun (ctxt, freed_size, _existed) -> - Tx_rollup_state_repr.adjust_storage_allocation - state - ~delta:Z.(neg @@ of_int freed_size) - >>?= fun (state, _) -> return (ctxt, state) + >>=? fun (ctxt, _freed_size, _existed) -> return ctxt +(* See {{Note}} in [Tx_rollup_commitment_storage] for a rationale on + why ignoring storage allocation is safe. *) diff --git a/src/proto_alpha/lib_protocol/tx_rollup_reveal_storage.mli b/src/proto_alpha/lib_protocol/tx_rollup_reveal_storage.mli index 7fa590af211b..a5d1e726ee83 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_reveal_storage.mli +++ b/src/proto_alpha/lib_protocol/tx_rollup_reveal_storage.mli @@ -27,17 +27,13 @@ (** [record ctxt tx_rollup lvl message_position] adds [message_position] to the list of message with revealed - withdrawals for [tx_rollup] at [lvl]. - - In addition to an updated context, returns a new rollup state, and - the number of bytes newly allocated by this function. *) + withdrawals for [tx_rollup] at [lvl]. *) val record : Raw_context.t -> Tx_rollup_repr.t -> - Tx_rollup_state_repr.t -> Tx_rollup_level_repr.t -> message_position:int -> - (Raw_context.t * Tx_rollup_state_repr.t * Z.t) tzresult Lwt.t + Raw_context.t tzresult Lwt.t (** [mem ctxt tx_rollup lvl message_position] checks if [message_position] has already had its withdrawals revealed for @@ -54,6 +50,5 @@ val mem : val remove : 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 + Raw_context.t tzresult Lwt.t -- GitLab From b62fa4473e999448e3b139a1b9eaa815979d32bd Mon Sep 17 00:00:00 2001 From: Thomas Letan Date: Mon, 28 Mar 2022 12:28:08 +0200 Subject: [PATCH 10/20] =?UTF-8?q?Proto,tx=5Frollup:=20Free=20the=20storage?= =?UTF-8?q?=20of=20an=20inbox=20when=20it=E2=80=99s=20committed=20to?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib_protocol/alpha_context.mli | 13 +- .../integration/operations/test_tx_rollup.ml | 41 +++--- .../tx_rollup_commitment_storage.ml | 20 ++- .../lib_protocol/tx_rollup_inbox_repr.ml | 4 +- .../lib_protocol/tx_rollup_inbox_repr.mli | 13 +- .../lib_protocol/tx_rollup_inbox_storage.ml | 42 ++---- .../lib_protocol/tx_rollup_inbox_storage.mli | 25 +--- .../lib_protocol/tx_rollup_state_repr.ml | 134 ++++++++++++------ .../lib_protocol/tx_rollup_state_repr.mli | 9 +- tezt/tests/tx_rollup.ml | 16 ++- 10 files changed, 178 insertions(+), 139 deletions(-) diff --git a/src/proto_alpha/lib_protocol/alpha_context.mli b/src/proto_alpha/lib_protocol/alpha_context.mli index b1a720b1e799..e5f2fea9f7d2 100644 --- a/src/proto_alpha/lib_protocol/alpha_context.mli +++ b/src/proto_alpha/lib_protocol/alpha_context.mli @@ -1747,6 +1747,7 @@ module Tx_rollup_state : sig ?commitment_newest_hash:Tx_rollup_commitment_hash.t -> ?tezos_head_level:Raw_level.t -> ?occupied_storage:Z.t -> + ?commitments_watermark:Tx_rollup_level.t -> allocated_storage:Z.t -> unit -> t @@ -1769,6 +1770,10 @@ module Tx_rollup_state : sig val next_commitment_level : t -> Raw_level.t -> Tx_rollup_level.t tzresult val uncommitted_inboxes_count : t -> int + + val reset_commitments_watermark : t -> t + + val get_commitments_watermark : t -> Tx_rollup_level.t option end end @@ -1866,6 +1871,8 @@ module Tx_rollup_inbox : sig type t = {inbox_length : int; cumulated_size : int; merkle_root : Merkle.root} + val size : Z.t + val ( = ) : t -> t -> bool val pp : Format.formatter -> t -> unit @@ -1879,12 +1886,6 @@ module Tx_rollup_inbox : sig Tx_rollup_message.t -> (context * Tx_rollup_state.t * Z.t) tzresult Lwt.t - val size : - context -> - Tx_rollup_level.t -> - Tx_rollup.t -> - (context * int) tzresult Lwt.t - val get : context -> Tx_rollup_level.t -> Tx_rollup.t -> (context * t) 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 4dd4d4abdd9a..82332d560372 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 @@ -1641,7 +1641,7 @@ let test_storage_burn_for_commitment () = ~pos:__POS__ zestable msg - (Z.of_int expected_delta) + expected_delta Z.(sub size_after size_before)) in let tx_rollup_origination_size = 1 in @@ -1656,9 +1656,10 @@ let test_storage_burn_for_commitment () = Op.tx_rollup_commit (I i) contract tx_rollup commitment >>=? fun op -> Incremental.add_operation i op >>=? fun i -> occupied_storage_size (I i) tx_rollup >>=? fun storage_size_after_commit -> - (* no storage burn for commitment because of the bond *) - let commitment_add_delta = 0 in - let commitment_remove_delta = 0 in + (* adding a commitment frees the inbox storage *) + let commitment_add_delta = Z.neg Tx_rollup_inbox.size in + (* removing a commitment doesn't change anything storage burn related *) + let commitment_remove_delta = Z.zero in check_storage_delta ~__POS__ "Size increase after adding commitment" @@ -1670,17 +1671,9 @@ let test_storage_burn_for_commitment () = Op.tx_rollup_finalize (B b) contract tx_rollup >>=? fun op -> Block.bake ~operation:op b >>=? fun b -> occupied_storage_size (B b) tx_rollup >>=? fun freed_space_after_finalize -> - let inbox_delta = - -1 - * Data_encoding.Binary.length - Tx_rollup_inbox.encoding - Tx_rollup_inbox. - { - cumulated_size = 0; - inbox_length = 0; - merkle_root = Merkle.merklize_list []; - } - in + (* the inbox does not allocate anything, because it was already + allocated by a freed inboxes *) + let inbox_delta = Z.zero in check_storage_delta ~__POS__ "Storage space is freed after finalize" @@ -1693,7 +1686,7 @@ let test_storage_burn_for_commitment () = Block.bake b ~operation >>=? fun b -> occupied_storage_size (B b) tx_rollup >>=? fun freed_space_after_remove_commitment -> - let commitment_remove_delta = -commitment_remove_delta in + let commitment_remove_delta = Z.neg commitment_remove_delta in check_storage_delta ~__POS__ "Storage space is freed after removing commitment" @@ -1705,7 +1698,7 @@ let test_storage_burn_for_commitment () = Block.bake b ~operation >>=? fun b -> occupied_storage_size (B b) tx_rollup >>=? fun freed_space_after_return_bond -> - let bond_remove_delta = 0 in + let bond_remove_delta = Z.zero in check_storage_delta ~__POS__ "Storage space is freed after removing bond" @@ -3315,7 +3308,12 @@ let test_state () = tx_rollup_state_testable_no_storage "state unchanged by commit/reject at root" initial_state - state_after_reject) ; + (Tx_rollup_state.Internal_for_tests.reset_commitments_watermark + state_after_reject)) ; + assert ( + Tx_rollup_state.Internal_for_tests.get_commitments_watermark + state_after_reject + = Some Tx_rollup_level.root) ; (* Commit an incorrect commitment again *) Op.tx_rollup_commit (B b) account1 tx_rollup commit1 >>=? fun operation -> Block.bake b ~operation >>=? fun b -> @@ -3339,7 +3337,8 @@ let test_state () = tx_rollup_state_testable_no_storage "state unchanged by commit/reject at root" initial_state - state_after_reject) ; + (Tx_rollup_state.Internal_for_tests.reset_commitments_watermark + state_after_reject)) ; (* Commit twice *) let commit1 = Tx_rollup_commitment. @@ -3501,13 +3500,13 @@ let test_state_message_storage_preallocation () = in (* The size an empty inbox as created in {!Tx_rollup_inbox_storage.prepare_inbox}. *) - let inbox_preparation = 40 in + let inbox_preparation = Tx_rollup_inbox.size in Alcotest.check ~pos:__POS__ zestable "the storage occupied by the first message is the size of the inbox plus \ the preallocation for commiting the message" - (Z.of_int inbox_preparation) + inbox_preparation (Z.sub occupied_storage_after occupied_storage_before) ; let occupied_storage_before = Tx_rollup_state.Internal_for_tests.get_occupied_storage state 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 eaeff7a31a6d..8a0f74874698 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_commitment_storage.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_commitment_storage.ml @@ -40,6 +40,14 @@ open Tx_rollup_errors_repr associated with this bond is deallocated. In other word, rollup operators have an incentive to keep the storage clean. + {{Note inbox}} The only storage that is not directly covered by the + bond are the inboxes. As a consequence, inboxes allocations are + still recorded normally. However, as soon as an inbox is committed + to, then it needs to be deleted for the bond to be retreived (as + part of the commitment finalization). As a consequence, we + virtually free the storage by an inbox (as accounted for by the + rollup) when it is committed to. + *) let check_message_result {messages; _} result ~path ~index = @@ -183,7 +191,7 @@ let check_commitment_predecessor ctxt state commitment = | (None, None) -> return ctxt | (provided, expected) -> fail (Wrong_predecessor_hash {provided; expected}) -let check_commitment_batches_and_merkle_root ctxt tx_rollup commitment = +let check_commitment_batches_and_merkle_root ctxt tx_rollup state commitment = Tx_rollup_inbox_storage.get ctxt commitment.level tx_rollup >>=? fun (ctxt, {inbox_length; merkle_root; _}) -> fail_unless @@ -193,7 +201,7 @@ let check_commitment_batches_and_merkle_root ctxt tx_rollup commitment = fail_unless Tx_rollup_inbox_repr.Merkle.(commitment.inbox_merkle_root = merkle_root) Wrong_inbox_hash - >>=? fun () -> return ctxt + >>=? fun () -> return (ctxt, state) let add_commitment ctxt tx_rollup state pkh commitment = let commitment_limit = @@ -208,8 +216,8 @@ let add_commitment ctxt tx_rollup state pkh commitment = let current_level = (Raw_context.current_level ctxt).level in check_commitment_level current_level state commitment >>?= fun () -> check_commitment_predecessor ctxt state commitment >>=? fun ctxt -> - check_commitment_batches_and_merkle_root ctxt tx_rollup commitment - >>=? fun ctxt -> + check_commitment_batches_and_merkle_root ctxt tx_rollup state commitment + >>=? fun (ctxt, state) -> (* Everything has been sorted out, let’s update the storage *) let commitment = Tx_rollup_commitment_repr.Full.compact commitment in let commitment_hash = Tx_rollup_commitment_repr.Compact.hash commitment in @@ -266,8 +274,8 @@ let finalize_commitment ctxt rollup state = No_commitment_to_finalize >>=? fun () -> (* We remove the inbox *) - Tx_rollup_inbox_storage.remove ctxt oldest_inbox_level rollup state - >>=? fun (ctxt, state) -> + 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 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 176c0e18a9ce..19b98fdf44b0 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_inbox_repr.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_inbox_repr.ml @@ -117,10 +117,12 @@ let encoding = let empty = {inbox_length = 0; cumulated_size = 0; merkle_root = Merkle_list.empty} +let size = Z.of_int @@ Data_encoding.Binary.length encoding empty + let pp fmt {inbox_length; cumulated_size; merkle_root} = Format.fprintf fmt - "Inbox with length %d, size %d and merkle root %a" + "Inbox with length %d, size %d, merkle root %a" inbox_length cumulated_size Merkle.pp_root 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 b4b58656b71e..beeeed082498 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_inbox_repr.mli +++ b/src/proto_alpha/lib_protocol/tx_rollup_inbox_repr.mli @@ -65,12 +65,17 @@ module Merkle : sig val merklize_list : Tx_rollup_message_repr.hash list -> root end -(** The view of 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. *) +(** The view of 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 t = {inbox_length : int; cumulated_size : int; merkle_root : Merkle.root} +(** [size] is the number of bytes necessary to store an inbox in the + layer-1 storage. *) +val size : Z.t + val ( = ) : t -> t -> bool val encoding : t Data_encoding.t 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 80b38e7daf1d..cf94d57c7bfa 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_inbox_storage.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_inbox_storage.ml @@ -27,23 +27,6 @@ open Tx_rollup_errors_repr -let size : - Raw_context.t -> - Tx_rollup_level_repr.t -> - Tx_rollup_repr.t -> - (Raw_context.t * int) tzresult Lwt.t = - fun ctxt level tx_rollup -> - Storage.Tx_rollup.Inbox.find (ctxt, level) tx_rollup >>=? function - | (ctxt, Some {cumulated_size; _}) -> return (ctxt, cumulated_size) - | (ctxt, None) -> - (* - Prior to raising an error related to the missing inbox, we - check whether or not the transaction rollup address is valid, - to raise the appropriate error if need be. - *) - Tx_rollup_state_storage.assert_exist ctxt tx_rollup >>=? fun _ctxt -> - fail (Inbox_does_not_exist (tx_rollup, level)) - let find : Raw_context.t -> Tx_rollup_level_repr.t -> @@ -145,14 +128,13 @@ let prepare_inbox : >>=? fun (ctxt, state) -> (* We need a new inbox *) Tx_rollup_state_repr.record_inbox_creation state level - >>?= fun (state, tx_level) -> + >>?= fun (state, tx_level, paid_storage_space_diff) -> let inbox = Tx_rollup_inbox_repr.empty in Storage.Tx_rollup.Inbox.init (ctxt, tx_level) rollup inbox - >>=? fun (ctxt, inbox_size_alloc) -> - Tx_rollup_state_repr.adjust_storage_allocation - state - ~delta:(Z.of_int inbox_size_alloc) - >>?= fun (state, paid_storage_space_diff) -> + >>=? fun (ctxt, _inbox_size_alloc) -> + (* Storage accounting is done by + [Tx_rollup_state_repr.record_inbox_creation], so we can + ignore [inbox_size_alloc]. *) return (ctxt, state, tx_level, inbox, paid_storage_space_diff) (** [update_inbox inbox msg_size] updates [metadata] to account @@ -221,18 +203,10 @@ let remove : Raw_context.t -> Tx_rollup_level_repr.t -> Tx_rollup_repr.t -> - Tx_rollup_state_repr.t -> - (Raw_context.t * Tx_rollup_state_repr.t) tzresult Lwt.t = - fun ctxt level rollup state -> + Raw_context.t tzresult Lwt.t = + fun ctxt level rollup -> Storage.Tx_rollup.Inbox.remove (ctxt, level) rollup - >>=? fun (ctxt, freed, _) -> - let delta = Z.of_int freed |> Z.neg in - (* while we free storage space and adjust storage - allocation, the returned [_paid_storage_size_diff] - is always 0. Therefore, we neglect - [_paid_storage_size_diff]. *) - Tx_rollup_state_repr.adjust_storage_allocation state ~delta - >>?= fun (state, _paid_storage_size_diff) -> return (ctxt, state) + >>=? fun (ctxt, _freed, _) -> return ctxt let check_message_hash : Raw_context.t -> 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 d6dfb1dd8fae..d184958bfa06 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_inbox_storage.mli +++ b/src/proto_alpha/lib_protocol/tx_rollup_inbox_storage.mli @@ -56,20 +56,6 @@ val append_message : Tx_rollup_message_repr.t -> (Raw_context.t * Tx_rollup_state_repr.t * Z.t) tzresult Lwt.t -(** [size ctxt level tx_rollup] returns the number of bytes allocated - by the messages of the inbox of [tx_rollup] at level [level]. - - Returns the errors - - {ul {li [Tx_rollup_does_not_exist] iff [tx_rollup] does not exist} - {li [Inbox_does_not_exist] iff [tx_rollup] exists, but does - not have an inbox at level [level]. }} *) -val size : - Raw_context.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 level [level]. @@ -94,8 +80,12 @@ val find : Tx_rollup_repr.t -> (Raw_context.t * Tx_rollup_inbox_repr.t option) tzresult Lwt.t -(** [remove ctxt level tx_rollup state] removes from the context the - inbox of [level] and adjusts [occupied_storage] in the [state]. +(** [remove ctxt level tx_rollup] removes from the context the inbox + of [level]. + + It is expected that this function is only called for inboxes that + has been “adopted” by a commitment. As a consequence, the storage + accounting is not performed by this function. This function will returns the error [Inbox_does_not_exist] if there is no inbox for [level] in the storage. It is the @@ -105,8 +95,7 @@ val remove : Raw_context.t -> Tx_rollup_level_repr.t -> Tx_rollup_repr.t -> - Tx_rollup_state_repr.t -> - (Raw_context.t * Tx_rollup_state_repr.t) tzresult Lwt.t + Raw_context.t tzresult Lwt.t (** [check_message_hash ctxt level tx_rollup position message path] checks that [message] is part of the [tx_rollup] inbox for [level] 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 3d766bcf6734..d7a7409c6f5a 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_state_repr.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_state_repr.ml @@ -115,6 +115,15 @@ let pp_range fmt = function Tx_rollup_level_repr.pp newest) +type watermark = Tx_rollup_level_repr.t option + +let is_above_watermark watermark level = + match watermark with + | Some watermark -> Tx_rollup_level_repr.(watermark < level) + | None -> true + +let make_watermark level = Some level + (** The state of a transaction rollup is composed of [burn_per_byte] and [inbox_ema] fields. [initial_state] introduces their initial values. Both values are updated by [update_burn_per_byte] as the @@ -159,6 +168,7 @@ type t = { inbox_ema : int; allocated_storage : Z.t; occupied_storage : Z.t; + commitments_watermark : watermark; } (* @@ -218,6 +228,7 @@ let initial_state ~pre_allocated_storage = inbox_ema = 0; allocated_storage = pre_allocated_storage; occupied_storage = Z.zero; + commitments_watermark = None; } let encoding : t Data_encoding.t = @@ -234,27 +245,30 @@ let encoding : t Data_encoding.t = allocated_storage; occupied_storage; inbox_ema; + commitments_watermark; } -> - ( last_removed_commitment_hashes, - finalized_commitments, - unfinalized_commitments, - uncommitted_inboxes, - commitment_newest_hash, - tezos_head_level, - burn_per_byte, - allocated_storage, - occupied_storage, - inbox_ema )) - (fun ( last_removed_commitment_hashes, - finalized_commitments, - unfinalized_commitments, - uncommitted_inboxes, - commitment_newest_hash, - tezos_head_level, - burn_per_byte, - allocated_storage, - occupied_storage, - inbox_ema ) -> + ( ( last_removed_commitment_hashes, + finalized_commitments, + unfinalized_commitments, + uncommitted_inboxes, + commitment_newest_hash, + tezos_head_level, + burn_per_byte, + allocated_storage, + occupied_storage, + inbox_ema ), + commitments_watermark )) + (fun ( ( last_removed_commitment_hashes, + finalized_commitments, + unfinalized_commitments, + uncommitted_inboxes, + commitment_newest_hash, + tezos_head_level, + burn_per_byte, + allocated_storage, + occupied_storage, + inbox_ema ), + commitments_watermark ) -> { last_removed_commitment_hashes; finalized_commitments; @@ -266,27 +280,33 @@ let encoding : t Data_encoding.t = allocated_storage; occupied_storage; inbox_ema; + commitments_watermark; }) - (obj10 - (req - "last_removed_commitment_hashes" - (option - @@ obj2 - (req - "last_message_hash" - Tx_rollup_message_result_hash_repr.encoding) - (req "commitment_hash" Tx_rollup_commitment_repr.Hash.encoding))) - (req "finalized_commitments" range_encoding) - (req "unfinalized_commitments" range_encoding) - (req "uncommitted_inboxes" range_encoding) - (req - "commitment_newest_hash" - (option Tx_rollup_commitment_repr.Hash.encoding)) - (req "tezos_head_level" (option Raw_level_repr.encoding)) - (req "burn_per_byte" Tez_repr.encoding) - (req "allocated_storage" n) - (req "occupied_storage" n) - (req "inbox_ema" int31)) + (merge_objs + (obj10 + (req + "last_removed_commitment_hashes" + (option + @@ obj2 + (req + "last_message_hash" + Tx_rollup_message_result_hash_repr.encoding) + (req + "commitment_hash" + Tx_rollup_commitment_repr.Hash.encoding))) + (req "finalized_commitments" range_encoding) + (req "unfinalized_commitments" range_encoding) + (req "uncommitted_inboxes" range_encoding) + (req + "commitment_newest_hash" + (option Tx_rollup_commitment_repr.Hash.encoding)) + (req "tezos_head_level" (option Raw_level_repr.encoding)) + (req "burn_per_byte" Tez_repr.encoding) + (req "allocated_storage" n) + (req "occupied_storage" n) + (req "inbox_ema" int31)) + (obj1 + (req "commitments_watermark" @@ option Tx_rollup_level_repr.encoding))) let pp fmt { @@ -300,6 +320,7 @@ let pp fmt allocated_storage; occupied_storage; inbox_ema; + commitments_watermark; } = Format.( fprintf @@ -308,7 +329,7 @@ let pp fmt unfinalized_commitments: %a uncommitted_inboxes: %a \ commitment_newest_hash: %a tezos_head_level: %a \ last_removed_commitment_hashes: %a allocated_storage: %a \ - occupied_storage: %a" + occupied_storage: %a commitments_watermark: %a" Tez_repr.pp burn_per_byte inbox_ema @@ -334,7 +355,9 @@ let pp fmt Z.pp_print allocated_storage Z.pp_print - occupied_storage) + occupied_storage + (pp_print_option Tx_rollup_level_repr.pp) + commitments_watermark) let adjust_storage_allocation : t -> delta:Z.t -> (t * Z.t) tzresult = fun state ~delta -> @@ -449,7 +472,12 @@ let record_inbox_creation t level = | None -> ok ()) >>? fun () -> let (uncommitted_inboxes, new_level) = extend t.uncommitted_inboxes in - ok ({t with tezos_head_level = Some level; uncommitted_inboxes}, new_level) + adjust_storage_allocation t ~delta:Tx_rollup_inbox_repr.size + >>? fun (t, diff) -> + ok + ( {t with tezos_head_level = Some level; uncommitted_inboxes}, + new_level, + diff ) let next_commitment_predecessor state = state.commitment_newest_hash @@ -508,13 +536,22 @@ let record_commitment_creation state level hash = >>? fun () -> shrink state.uncommitted_inboxes >>? fun uncommitted_inboxes -> let (unfinalized_commitments, _) = extend state.unfinalized_commitments in - ok + let state = { state with uncommitted_inboxes; unfinalized_commitments; commitment_newest_hash = Some hash; } + in + if is_above_watermark state.commitments_watermark level then + (* See {{Note inbox}} in [Tx_rollup_commitment_storage] for + why it is safe to “free” the inbox storage when it is + committed too. *) + adjust_storage_allocation state ~delta:(Z.neg Tx_rollup_inbox_repr.size) + >>? fun (state, _) -> + ok {state with commitments_watermark = make_watermark level} + else ok state | None -> error (Internal_error "Cannot create a commitment due to lack of inbox") @@ -621,6 +658,7 @@ module Internal_for_tests = struct ?commitment_newest_hash:Tx_rollup_commitment_repr.Hash.t -> ?tezos_head_level:Raw_level_repr.t -> ?occupied_storage:Z.t -> + ?commitments_watermark:Tx_rollup_level_repr.t -> allocated_storage:Z.t -> unit -> t = @@ -633,6 +671,7 @@ module Internal_for_tests = struct ?commitment_newest_hash ?tezos_head_level ?(occupied_storage = Z.zero) + ?commitments_watermark ~allocated_storage () -> let to_range = function @@ -657,6 +696,7 @@ module Internal_for_tests = struct uncommitted_inboxes; commitment_newest_hash; tezos_head_level; + commitments_watermark; } let get_inbox_ema : t -> int = fun {inbox_ema; _} -> inbox_ema @@ -672,4 +712,10 @@ module Internal_for_tests = struct let set_allocated_storage : Z.t -> t -> t = fun allocated_storage st -> {st with allocated_storage} + + let reset_commitments_watermark : t -> t = + fun st -> {st with commitments_watermark = None} + + let get_commitments_watermark : t -> Tx_rollup_level_repr.t option = + fun st -> st.commitments_watermark end 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 80c9f3231d44..91289c3c4baf 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_state_repr.mli +++ b/src/proto_alpha/lib_protocol/tx_rollup_state_repr.mli @@ -123,13 +123,13 @@ val next_commitment_predecessor : t -> Tx_rollup_commitment_repr.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. + inbox and the number of bytes allocated for the inbox. This function 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 + t -> Raw_level_repr.t -> (t * Tx_rollup_level_repr.t * Z.t) tzresult (** [record_inbox_deletion state level] updates [state] to take into account the deletion of the inbox stored at Tezos [level] from the @@ -234,6 +234,7 @@ module Internal_for_tests : sig ?commitment_newest_hash:Tx_rollup_commitment_repr.Hash.t -> ?tezos_head_level:Raw_level_repr.t -> ?occupied_storage:Z.t -> + ?commitments_watermark:Tx_rollup_level_repr.t -> allocated_storage:Z.t -> unit -> t @@ -247,4 +248,8 @@ module Internal_for_tests : sig val get_allocated_storage : t -> Z.t val set_allocated_storage : Z.t -> t -> t + + val reset_commitments_watermark : t -> t + + val get_commitments_watermark : t -> Tx_rollup_level_repr.t option end diff --git a/tezt/tests/tx_rollup.ml b/tezt/tests/tx_rollup.ml index fe8f9638c0b7..b8d342c1a5cd 100644 --- a/tezt/tests/tx_rollup.ml +++ b/tezt/tests/tx_rollup.ml @@ -1156,7 +1156,7 @@ let test_rollup_bond_return = let batch_commit_finalize = let current_calls_counter = ref 0 in let step msg = Log.info "call %d) - %s" !current_calls_counter msg in - fun ?(finalize = true) ~rollup_level () -> + fun ?(finalize = true) ?(remove = true) ~rollup_level () -> incr current_calls_counter ; step "1. Submit batch" ; @@ -1186,8 +1186,18 @@ let test_rollup_bond_return = else let () = step "5. Submit finalize_commitment and bake" in let*! () = submit_finalize_commitment state in - let* () = check_bond_is ~src client ~expected:commit_bond in - Client.bake_for client + if not remove then unit + else ( + step "6. Repeat bake before finalizing commitment" ; + let* () = + (* +1 because [submit_finalize_commitment] does not bake *) + repeat (parameters.withdraw_period + 1) (fun () -> + Client.bake_for client) + in + let () = step "7. Submit remove_commitment and bake" in + let*! () = submit_remove_commitment state in + let* () = check_bond_is ~src client ~expected:commit_bond in + Client.bake_for client) in (* 1st scenario: batch; commit; finalize; return bond (OK) *) Log.info "1st scenario: batch; commit; finalize; return bond (OK)" ; -- GitLab From e05caf74fe06d0ce0005308dded9739854638f2c Mon Sep 17 00:00:00 2001 From: Thomas Letan Date: Sat, 26 Mar 2022 16:35:12 +0100 Subject: [PATCH 11/20] Proto,tx_rollup: Refine constants related to withdrawals and tickets --- .../lib_parameters/default_parameters.ml | 22 ++++++++++++++----- .../lib_protocol/alpha_context.mli | 2 +- .../lib_protocol/constants_repr.ml | 2 +- .../lib_protocol/constants_repr.mli | 19 +++++++++++++--- src/proto_alpha/lib_protocol/raw_context.ml | 19 ++++++++++++++-- 5 files changed, 52 insertions(+), 12 deletions(-) diff --git a/src/proto_alpha/lib_parameters/default_parameters.ml b/src/proto_alpha/lib_parameters/default_parameters.ml index 3db7d601b9c9..e9d4d38d1ce8 100644 --- a/src/proto_alpha/lib_parameters/default_parameters.ml +++ b/src/proto_alpha/lib_parameters/default_parameters.ml @@ -108,10 +108,6 @@ let constants_mainnet = (* Transaction rollup’s size limits are expressed in number of bytes *) tx_rollup_hard_size_limit_per_inbox = 100_000; tx_rollup_hard_size_limit_per_message = 5_000; - (* We limit the number of withdraws per message to avoid costly - allocations/iterations in the accounting mechanism used for each - withdraw claiming in L1 and cleaned when removing a commitment. *) - tx_rollup_max_withdrawals_per_batch = 255; tx_rollup_commitment_bond = Tez.of_mutez_exn 10_000_000_000L; tx_rollup_finality_period; tx_rollup_max_inboxes_count = tx_rollup_finality_period + 100; @@ -121,7 +117,23 @@ let constants_mainnet = (* Must be greater than the withdraw period. *) tx_rollup_max_commitments_count = (2 * tx_rollup_finality_period) + 100; tx_rollup_cost_per_byte_ema_factor = 120; - tx_rollup_max_ticket_payload_size = 10_240; + (* Tickets are transmitted in batches in the + [Tx_rollup_dispatch_tickets] operation. + + The semantics is that this operation is used to + concretize the withdraw orders emitted by the layer-2, + one layer-1 operation per messages of an + inbox. Therefore, it is of significant importance that + a valid batch does not produce a list of withdraw + orders which could not fit in a layer-1 operation. + + With these values, at least 2048 bytes remain available + to store the rest of the operands of + [Tx_rollup_dispatch_tickets] (in practice, even more, + because we overapproximate the size of tickets). So we + are safe. *) + tx_rollup_max_withdrawals_per_batch = 15; + tx_rollup_max_ticket_payload_size = 2_048; (* Must be smaller than maximum limit of a manager operation (minus overhead), since we need to limit our proofs to those that can fit in an operation. *) diff --git a/src/proto_alpha/lib_protocol/alpha_context.mli b/src/proto_alpha/lib_protocol/alpha_context.mli index e5f2fea9f7d2..60c22baaf8e5 100644 --- a/src/proto_alpha/lib_protocol/alpha_context.mli +++ b/src/proto_alpha/lib_protocol/alpha_context.mli @@ -795,7 +795,6 @@ module Constants : sig tx_rollup_origination_size : int; tx_rollup_hard_size_limit_per_inbox : int; tx_rollup_hard_size_limit_per_message : int; - tx_rollup_max_withdrawals_per_batch : int; tx_rollup_commitment_bond : Tez.t; tx_rollup_finality_period : int; tx_rollup_withdraw_period : int; @@ -804,6 +803,7 @@ module Constants : sig tx_rollup_max_commitments_count : int; tx_rollup_cost_per_byte_ema_factor : int; tx_rollup_max_ticket_payload_size : int; + tx_rollup_max_withdrawals_per_batch : int; tx_rollup_rejection_max_proof_size : int; sc_rollup_enable : bool; sc_rollup_origination_size : int; diff --git a/src/proto_alpha/lib_protocol/constants_repr.ml b/src/proto_alpha/lib_protocol/constants_repr.ml index 43e4bca9c6b4..5d80f9dfbe18 100644 --- a/src/proto_alpha/lib_protocol/constants_repr.ml +++ b/src/proto_alpha/lib_protocol/constants_repr.ml @@ -163,7 +163,6 @@ type parametric = { tx_rollup_origination_size : int; tx_rollup_hard_size_limit_per_inbox : int; tx_rollup_hard_size_limit_per_message : int; - tx_rollup_max_withdrawals_per_batch : int; tx_rollup_commitment_bond : Tez_repr.t; tx_rollup_finality_period : int; tx_rollup_withdraw_period : int; @@ -172,6 +171,7 @@ type parametric = { tx_rollup_max_commitments_count : int; tx_rollup_cost_per_byte_ema_factor : int; tx_rollup_max_ticket_payload_size : int; + tx_rollup_max_withdrawals_per_batch : int; tx_rollup_rejection_max_proof_size : int; sc_rollup_enable : bool; sc_rollup_origination_size : int; diff --git a/src/proto_alpha/lib_protocol/constants_repr.mli b/src/proto_alpha/lib_protocol/constants_repr.mli index 41a5cf7ff61d..88dddacbe7fb 100644 --- a/src/proto_alpha/lib_protocol/constants_repr.mli +++ b/src/proto_alpha/lib_protocol/constants_repr.mli @@ -133,8 +133,6 @@ type parametric = { tx_rollup_hard_size_limit_per_inbox : int; (* the maximum amount of bytes one batch can allocate in an inbox *) tx_rollup_hard_size_limit_per_message : int; - (* the maximum number of allowed "L2-to-L1" withdraws per batch *) - tx_rollup_max_withdrawals_per_batch : int; (* the amount of tez to bond a tx rollup commitment *) tx_rollup_commitment_bond : Tez_repr.t; (* the number of blocks before a tx rollup block is final *) @@ -154,8 +152,23 @@ type parametric = { (* The number of blocks used to compute the ema factor determining the cost per byte for new messages in the inbox. *) tx_rollup_cost_per_byte_ema_factor : int; - (* maximum size, in bytes, of the contents given in deposited tickets. *) + (* Tickets are transmitted in batches in the + [Tx_rollup_dispatch_tickets] operation. + + The semantics is that this operation is used to + concretize the withdraw orders emitted by the layer-2, + one layer-1 operation per messages of an + inbox. Therefore, it is of significant importance that + a valid batch does not produce a list of withdraw + orders which could not fit in a layer-1 operation. + + With these values, at least 2048 bytes remain available + to store the rest of the operands of + [Tx_rollup_dispatch_tickets] (in practice, even more, + because we overapproximate the size of tickets). So we + are safe. *) tx_rollup_max_ticket_payload_size : int; + tx_rollup_max_withdrawals_per_batch : int; (* The maximum size, in bytes, of a Merkle proof. Operations which would require proofs larger than this should be no-ops. *) tx_rollup_rejection_max_proof_size : int; diff --git a/src/proto_alpha/lib_protocol/raw_context.ml b/src/proto_alpha/lib_protocol/raw_context.ml index 502ed8486379..337bd79f532e 100644 --- a/src/proto_alpha/lib_protocol/raw_context.ml +++ b/src/proto_alpha/lib_protocol/raw_context.ml @@ -909,7 +909,23 @@ let prepare_first_block ~level ~timestamp ctxt = tx_rollup_origination_size = 60_000; tx_rollup_hard_size_limit_per_inbox = 100_000; tx_rollup_hard_size_limit_per_message = 5_000; - tx_rollup_max_withdrawals_per_batch = 255; + (* Tickets are transmitted in batches in the + [Tx_rollup_dispatch_tickets] operation. + + The semantics is that this operation is used to + concretize the withdraw orders emitted by the layer-2, + one layer-1 operation per messages of an + inbox. Therefore, it is of significant importance that + a valid batch does not produce a list of withdraw + orders which could not fit in a layer-1 operation. + + With these values, at least 2048 bytes remain available + to store the rest of the operands of + [Tx_rollup_dispatch_tickets] (in practice, even more, + because we overapproximate the size of tickets). So we + are safe. *) + tx_rollup_max_withdrawals_per_batch = 15; + tx_rollup_max_ticket_payload_size = 2_048; tx_rollup_commitment_bond = Tez_repr.of_mutez_exn 10_000_000_000L; tx_rollup_finality_period; tx_rollup_withdraw_period = tx_rollup_finality_period; @@ -923,7 +939,6 @@ let prepare_first_block ~level ~timestamp ctxt = (2 * tx_rollup_finality_period) + 100; (* The default ema factor is [120] blocks, so about one hour. *) tx_rollup_cost_per_byte_ema_factor = 120; - tx_rollup_max_ticket_payload_size = 10_240; tx_rollup_rejection_max_proof_size = 30_000; sc_rollup_enable = false; (* The following value is chosen to prevent spam. *) -- GitLab From 7edd3613e9e48b802446f1ad3a258eb685ec9baf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Thir=C3=A9?= Date: Mon, 28 Mar 2022 11:27:16 +0200 Subject: [PATCH 12/20] Plugin/Tx_rollup: Add RPCs helper to play with merkle trees --- src/proto_alpha/lib_plugin/plugin.ml | 49 +++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/src/proto_alpha/lib_plugin/plugin.ml b/src/proto_alpha/lib_plugin/plugin.ml index 6967251399eb..c68d138d1f9a 100644 --- a/src/proto_alpha/lib_plugin/plugin.ml +++ b/src/proto_alpha/lib_plugin/plugin.ml @@ -3083,6 +3083,39 @@ module RPC = struct ~output:(obj1 (req "path" Tx_rollup_inbox.Merkle.path_encoding)) RPC_path.(path / "merkle_tree_path") end + + module Commitment = struct + let path = RPC_path.(path / "commitment") + + let merkle_tree_hash = + RPC_service.post_service + ~description:"Compute the merkle tree hash of a commitment" + ~query:RPC_query.empty + ~input: + (obj1 + (req + "message_result_hashes" + (list Tx_rollup_message_result_hash.encoding))) + ~output: + (obj1 (req "hash" Tx_rollup_commitment.Merkle_hash.encoding)) + RPC_path.(path / "merkle_tree_hash") + + let merkle_tree_path = + RPC_service.post_service + ~description: + "Compute a path of a message result hash in the commitment \ + merkle tree" + ~query:RPC_query.empty + ~input: + (obj2 + (req + "message_result_hashes" + (list Tx_rollup_message_result_hash.encoding)) + (req "position" int16)) + ~output: + (obj1 (req "path" Tx_rollup_commitment.Merkle.path_encoding)) + RPC_path.(path / "merkle_tree_path") + end end end @@ -3130,7 +3163,21 @@ module RPC = struct S.Tx_rollup.Inbox.merkle_tree_path (fun () (message_hashes, position) -> Lwt.return - (Tx_rollup_inbox.Merkle.compute_path message_hashes position)) + (Tx_rollup_inbox.Merkle.compute_path message_hashes position)) ; + Registration.register0_noctxt + ~chunked:true + S.Tx_rollup.Commitment.merkle_tree_hash + (fun () message_result_hashes -> + let open Tx_rollup_commitment.Merkle in + let tree = List.fold_left snoc nil message_result_hashes in + return (root tree)) ; + Registration.register0_noctxt + ~chunked:true + S.Tx_rollup.Commitment.merkle_tree_path + (fun () (message_result_hashes, position) -> + let open Tx_rollup_commitment.Merkle in + let tree = List.fold_left snoc nil message_result_hashes in + Lwt.return (compute_path tree position)) module Manager = struct let[@coq_axiom_with_reason "cast on e"] operations ctxt block ~branch -- GitLab From 365635f17b0ce9a318614bf66b85ad8105ff9df0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Thir=C3=A9?= Date: Mon, 28 Mar 2022 11:58:26 +0200 Subject: [PATCH 13/20] Tezt/Tx_rollup: Add wrappers for new RPCs --- tezt/lib_tezos/RPC.ml | 36 ++++++++++++++++++++++++++++++++++++ tezt/lib_tezos/RPC.mli | 20 ++++++++++++++++++++ tezt/lib_tezos/rollup.ml | 32 ++++++++++++++++++++++++++++++++ tezt/lib_tezos/rollup.mli | 13 +++++++++++++ 4 files changed, 101 insertions(+) diff --git a/tezt/lib_tezos/RPC.ml b/tezt/lib_tezos/RPC.ml index d9079e60ec81..c2333052ab2f 100644 --- a/tezt/lib_tezos/RPC.ml +++ b/tezt/lib_tezos/RPC.ml @@ -649,6 +649,42 @@ module Tx_rollup = struct in Client.Spawn.rpc ?endpoint ?hooks ~data POST path client end + + module Commitment = struct + let merkle_tree_hash ?endpoint ?hooks ?(chain = "main") ?(block = "head") + ~data client = + let path = + [ + "chains"; + chain; + "blocks"; + block; + "helpers"; + "forge"; + "tx_rollup"; + "commitment"; + "merkle_tree_hash"; + ] + in + Client.Spawn.rpc ?endpoint ?hooks ~data POST path client + + let merkle_tree_path ?endpoint ?hooks ?(chain = "main") ?(block = "head") + ~data client = + let path = + [ + "chains"; + chain; + "blocks"; + block; + "helpers"; + "forge"; + "tx_rollup"; + "commitment"; + "merkle_tree_path"; + ] + in + Client.Spawn.rpc ?endpoint ?hooks ~data POST path client + end end end diff --git a/tezt/lib_tezos/RPC.mli b/tezt/lib_tezos/RPC.mli index 3154998a3afb..99e440e3fdb0 100644 --- a/tezt/lib_tezos/RPC.mli +++ b/tezt/lib_tezos/RPC.mli @@ -950,6 +950,26 @@ module Tx_rollup : sig Client.t -> JSON.t Process.runnable end + + module Commitment : sig + val merkle_tree_hash : + ?endpoint:Client.endpoint -> + ?hooks:Process.hooks -> + ?chain:string -> + ?block:string -> + data:JSON.u -> + Client.t -> + JSON.t Process.runnable + + val merkle_tree_path : + ?endpoint:Client.endpoint -> + ?hooks:Process.hooks -> + ?chain:string -> + ?block:string -> + data:JSON.u -> + Client.t -> + JSON.t Process.runnable + end end end diff --git a/tezt/lib_tezos/rollup.ml b/tezt/lib_tezos/rollup.ml index ee1fb12612fb..e630fe228c67 100644 --- a/tezt/lib_tezos/rollup.ml +++ b/tezt/lib_tezos/rollup.ml @@ -131,6 +131,38 @@ module Tx_rollup = struct RPC.Tx_rollup.Forge.Inbox.merkle_tree_path ?hooks ~data client |> map_runnable parse + let commitment_merkle_tree_hash ?hooks ~message_result_hashes client = + let parse json = `Hash JSON.(json |-> "hash" |> as_string) in + let make_message (`Hash message) : JSON.u = `String message in + let data = + `O + [ + ( "message_result_hashes", + `A (List.map make_message message_result_hashes) ); + ] + in + let runnable = + RPC.Tx_rollup.Forge.Commitment.merkle_tree_hash ?hooks ~data client + in + map_runnable parse runnable + + let commitment_merkle_tree_path ?hooks ~message_result_hashes ~position client + = + let parse json = JSON.(json |-> "path") in + let make_message (`Hash message) : JSON.u = `String message in + let data = + `O + [ + ( "message_result_hashes", + `A (List.map make_message message_result_hashes) ); + ("position", `Float (float_of_int position)); + ] + in + let runnable = + RPC.Tx_rollup.Forge.Commitment.merkle_tree_path ?hooks ~data client + in + map_runnable parse runnable + let compute_inbox_from_messages ?hooks messages client = let* message_hashes = Lwt_list.map_p diff --git a/tezt/lib_tezos/rollup.mli b/tezt/lib_tezos/rollup.mli index 065d99a882ac..60814434c12a 100644 --- a/tezt/lib_tezos/rollup.mli +++ b/tezt/lib_tezos/rollup.mli @@ -87,6 +87,19 @@ module Tx_rollup : sig Client.t -> JSON.t Process.runnable + val commitment_merkle_tree_hash : + ?hooks:Process.hooks -> + message_result_hashes:[`Hash of string] list -> + Client.t -> + [> `Hash of string] Process.runnable + + val commitment_merkle_tree_path : + ?hooks:Process.hooks -> + message_result_hashes:[`Hash of string] list -> + position:int -> + Client.t -> + JSON.t Process.runnable + val compute_inbox_from_messages : ?hooks:Process.hooks -> message list -> Client.t -> inbox Lwt.t -- GitLab From 1147940a7c6c90850a27c8339227d5c37dfa2956 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Thir=C3=A9?= Date: Mon, 28 Mar 2022 11:58:42 +0200 Subject: [PATCH 14/20] Tezt/Tx_rollup: Use correct constant for withdrawals --- tezt/lib_tezos/constant.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tezt/lib_tezos/constant.ml b/tezt/lib_tezos/constant.ml index be1e10953c59..020339700038 100644 --- a/tezt/lib_tezos/constant.ml +++ b/tezt/lib_tezos/constant.ml @@ -120,7 +120,7 @@ let tx_rollup_empty_l2_context = "CoVu7Pqp1Gh3z33mink5T5Q2kAQKtnn3GHxVhyehdKZpQMBxFBGF" let tx_rollup_empty_withdraw_list = - "txw1jPmDA4PYvXduFE2WQmfZKFQPnwgCSiNjb9SZPMm4hceZsBmvP" + "txw1sFoLju3ySMAdY6v1dcHUMqJ4Zxc1kcynC8xkYgCmH6bpNSDhV" let tx_rollup_initial_message_result = "txmr2DouKqJu5o8KEVGe6gLoiw1J3krjsxhf6C2a1kDNTTr8BdKpf2" -- GitLab From f8fa56f3b57b6f4aeb58dd87fb01dbd906777779 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Thir=C3=A9?= Date: Sun, 27 Mar 2022 15:10:05 +0200 Subject: [PATCH 15/20] Tezt/Tx_rollup: Fix rejection tests --- .../_regressions/tx_rollup_batch_encoding.out | 4 +- .../tx_rollup_finalize_commitment_future.out | 4 +- ...llup_finalize_commitment_no_commitment.out | 4 +- ..._rollup_finalize_too_recent_commitment.out | 16 ++-- .../tx_rollup_limit_empty_batch.out | 4 +- .../tx_rollup_limit_maximum_size_batch.out | 4 +- .../tx_rollup_limit_maximum_size_inbox.out | 83 ++++++++++--------- .../_regressions/tx_rollup_rpc_commitment.out | 24 +++--- tezt/_regressions/tx_rollup_rpc_inbox.out | 7 +- ..._rollup_rpc_pending_bonded_commitments.out | 16 ++-- tezt/lib_tezos/client.ml | 11 ++- tezt/lib_tezos/client.mli | 3 + tezt/lib_tezos/constant.ml | 2 +- tezt/lib_tezos/operation.ml | 48 ++++++++--- tezt/lib_tezos/operation.mli | 12 ++- tezt/tests/tx_rollup.ml | 64 ++++++++++++-- 16 files changed, 202 insertions(+), 104 deletions(-) diff --git a/tezt/_regressions/tx_rollup_batch_encoding.out b/tezt/_regressions/tx_rollup_batch_encoding.out index a579f3d2f814..3ac824c7b385 100644 --- a/tezt/_regressions/tx_rollup_batch_encoding.out +++ b/tezt/_regressions/tx_rollup_batch_encoding.out @@ -31,7 +31,7 @@ This sequence of operations was run: ./tezos-client --wait none submit tx rollup batch 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' Node is bootstrapped. -Estimated gas: 2021.950 units (will add 100 for safety) +Estimated gas: 2021.958 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -53,6 +53,6 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2021.950 + Consumed gas: 2021.958 "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff" diff --git a/tezt/_regressions/tx_rollup_finalize_commitment_future.out b/tezt/_regressions/tx_rollup_finalize_commitment_future.out index 32a06840a31e..9f933e9345c8 100644 --- a/tezt/_regressions/tx_rollup_finalize_commitment_future.out +++ b/tezt/_regressions/tx_rollup_finalize_commitment_future.out @@ -31,7 +31,7 @@ This sequence of operations was run: ./tezos-client --wait none submit tx rollup batch 626c6f62 to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' Node is bootstrapped. -Estimated gas: 2021.382 units (will add 100 for safety) +Estimated gas: 2021.390 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -53,7 +53,7 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2021.382 + Consumed gas: 2021.390 ./tezos-client --wait none submit tx rollup finalize commitment to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' diff --git a/tezt/_regressions/tx_rollup_finalize_commitment_no_commitment.out b/tezt/_regressions/tx_rollup_finalize_commitment_no_commitment.out index 507089b40791..af086f0a7f8a 100644 --- a/tezt/_regressions/tx_rollup_finalize_commitment_no_commitment.out +++ b/tezt/_regressions/tx_rollup_finalize_commitment_no_commitment.out @@ -31,7 +31,7 @@ This sequence of operations was run: ./tezos-client --wait none submit tx rollup batch 626c6f62 to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' Node is bootstrapped. -Estimated gas: 2021.382 units (will add 100 for safety) +Estimated gas: 2021.390 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -53,7 +53,7 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2021.382 + Consumed gas: 2021.390 ./tezos-client --wait none submit tx rollup finalize commitment to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' diff --git a/tezt/_regressions/tx_rollup_finalize_too_recent_commitment.out b/tezt/_regressions/tx_rollup_finalize_too_recent_commitment.out index bc78df3f7011..f5beadb6af80 100644 --- a/tezt/_regressions/tx_rollup_finalize_too_recent_commitment.out +++ b/tezt/_regressions/tx_rollup_finalize_too_recent_commitment.out @@ -31,7 +31,7 @@ This sequence of operations was run: ./tezos-client --wait none submit tx rollup batch 626c6f62 to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' Node is bootstrapped. -Estimated gas: 2021.382 units (will add 100 for safety) +Estimated gas: 2021.390 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -53,12 +53,12 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2021.382 + Consumed gas: 2021.390 ./tezos-client --wait none submit tx rollup commitment 0 '[TX_ROLLUP_INBOX_HASH]' '[TX_ROLLUP_MESSAGE_RESULT_HASH]' to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' Node is bootstrapped. -Estimated gas: 3270.982 units (will add 100 for safety) +Estimated gas: 3471.272 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -69,20 +69,20 @@ 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.000655 + Fee to the baker: ꜩ0.000675 Expected counter: 3 - Gas limit: 3371 + Gas limit: 3572 Storage limit: 0 bytes Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.000655 - payload fees(the block proposer) ....... +ꜩ0.000655 + [PUBLIC_KEY_HASH] ... -ꜩ0.000675 + payload fees(the block proposer) ....... +ꜩ0.000675 Tx rollup commitment:[TX_ROLLUP_HASH], commitment 0 : messages = [TX_ROLLUP_MESSAGE_RESULT_HASH] predecessor for inbox with merkle root [TX_ROLLUP_INBOX_HASH] From: [PUBLIC_KEY_HASH] This tx rollup commit operation was successfully applied Balance updates: [PUBLIC_KEY_HASH] ....................................................... -ꜩ10000 Frozen_bonds([PUBLIC_KEY_HASH],[TX_ROLLUP_HASH]) ... +ꜩ10000 - Consumed gas: 3270.982 + Consumed gas: 3471.272 ./tezos-client --wait none submit tx rollup finalize commitment to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' diff --git a/tezt/_regressions/tx_rollup_limit_empty_batch.out b/tezt/_regressions/tx_rollup_limit_empty_batch.out index 2dcfdfd5fb84..6411d0c0a842 100644 --- a/tezt/_regressions/tx_rollup_limit_empty_batch.out +++ b/tezt/_regressions/tx_rollup_limit_empty_batch.out @@ -31,7 +31,7 @@ This sequence of operations was run: ./tezos-client --wait none submit tx rollup batch to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' Node is bootstrapped. -Estimated gas: 2021.374 units (will add 100 for safety) +Estimated gas: 2021.382 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -53,5 +53,5 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2021.374 + Consumed gas: 2021.382 diff --git a/tezt/_regressions/tx_rollup_limit_maximum_size_batch.out b/tezt/_regressions/tx_rollup_limit_maximum_size_batch.out index 2c6b83ffe874..5460dbe04f23 100644 --- a/tezt/_regressions/tx_rollup_limit_maximum_size_batch.out +++ b/tezt/_regressions/tx_rollup_limit_maximum_size_batch.out @@ -31,7 +31,7 @@ This sequence of operations was run: ./tezos-client --wait none submit tx rollup batch 6262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262 to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' Node is bootstrapped. -Estimated gas: 2032.624 units (will add 100 for safety) +Estimated gas: 2032.632 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -53,7 +53,7 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2032.624 + Consumed gas: 2032.632 ./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 70d592447bdc..b1029ea52317 100644 --- a/tezt/_regressions/tx_rollup_limit_maximum_size_inbox.out +++ b/tezt/_regressions/tx_rollup_limit_maximum_size_inbox.out @@ -31,7 +31,7 @@ This sequence of operations was run: ./tezos-client --wait none submit tx rollup batch 6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161 to '[TX_ROLLUP_HASH]' from bootstrap1 Node is bootstrapped. -Estimated gas: 2032.624 units (will add 100 for safety) +Estimated gas: 2032.632 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -53,12 +53,12 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2032.624 + Consumed gas: 2032.632 ./tezos-client --wait none submit tx rollup batch 6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161 to '[TX_ROLLUP_HASH]' from bootstrap2 Node is bootstrapped. -Estimated gas: 2032.624 units (will add 100 for safety) +Estimated gas: 2032.632 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -80,12 +80,12 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2032.624 + Consumed gas: 2032.632 ./tezos-client --wait none submit tx rollup batch 6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161 to '[TX_ROLLUP_HASH]' from bootstrap3 Node is bootstrapped. -Estimated gas: 2032.624 units (will add 100 for safety) +Estimated gas: 2032.632 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -107,12 +107,12 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2032.624 + Consumed gas: 2032.632 ./tezos-client --wait none submit tx rollup batch 6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161 to '[TX_ROLLUP_HASH]' from bootstrap4 Node is bootstrapped. -Estimated gas: 2032.624 units (will add 100 for safety) +Estimated gas: 2032.632 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -134,12 +134,12 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2032.624 + Consumed gas: 2032.632 ./tezos-client --wait none submit tx rollup batch 6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161 to '[TX_ROLLUP_HASH]' from bootstrap5 Node is bootstrapped. -Estimated gas: 2032.624 units (will add 100 for safety) +Estimated gas: 2032.632 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -161,13 +161,13 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2032.624 + Consumed gas: 2032.632 ./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: 2032.624 units (will add 100 for safety) +Estimated gas: 2032.632 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -203,13 +203,13 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2032.624 + Consumed gas: 2032.632 ./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: 2032.624 units (will add 100 for safety) +Estimated gas: 2032.632 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -245,13 +245,13 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2032.624 + Consumed gas: 2032.632 ./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: 2032.624 units (will add 100 for safety) +Estimated gas: 2032.632 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -287,13 +287,13 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2032.624 + Consumed gas: 2032.632 ./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: 2032.624 units (will add 100 for safety) +Estimated gas: 2032.632 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -329,13 +329,13 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2032.624 + Consumed gas: 2032.632 ./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: 2032.624 units (will add 100 for safety) +Estimated gas: 2032.632 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -371,13 +371,13 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2032.624 + Consumed gas: 2032.632 ./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: 2032.624 units (will add 100 for safety) +Estimated gas: 2032.632 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -413,13 +413,13 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2032.624 + Consumed gas: 2032.632 ./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: 2032.624 units (will add 100 for safety) +Estimated gas: 2032.632 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -455,13 +455,13 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2032.624 + Consumed gas: 2032.632 ./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: 2032.624 units (will add 100 for safety) +Estimated gas: 2032.632 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -497,13 +497,13 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2032.624 + Consumed gas: 2032.632 ./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: 2032.624 units (will add 100 for safety) +Estimated gas: 2032.632 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -539,13 +539,13 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2032.624 + Consumed gas: 2032.632 ./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: 2032.624 units (will add 100 for safety) +Estimated gas: 2032.632 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -581,13 +581,13 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2032.624 + Consumed gas: 2032.632 ./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: 2032.624 units (will add 100 for safety) +Estimated gas: 2032.632 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -623,13 +623,13 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2032.624 + Consumed gas: 2032.632 ./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: 2032.624 units (will add 100 for safety) +Estimated gas: 2032.632 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -665,13 +665,13 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2032.624 + Consumed gas: 2032.632 ./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: 2032.624 units (will add 100 for safety) +Estimated gas: 2032.632 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -707,13 +707,13 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2032.624 + Consumed gas: 2032.632 ./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: 2032.624 units (will add 100 for safety) +Estimated gas: 2032.632 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -749,13 +749,13 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2032.624 + Consumed gas: 2032.632 ./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: 2032.624 units (will add 100 for safety) +Estimated gas: 2032.632 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -791,9 +791,10 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2032.624 + Consumed gas: 2032.632 ./tezos-client rpc get '/chains/main/blocks/head/context/tx_rollup/[TX_ROLLUP_HASH]/inbox/0' { "inbox_length": 20, "cumulated_size": 100000, - "merkle_root": "[TX_ROLLUP_INBOX_HASH]" } + "merkle_root": "[TX_ROLLUP_INBOX_HASH]", + "orphan": true } diff --git a/tezt/_regressions/tx_rollup_rpc_commitment.out b/tezt/_regressions/tx_rollup_rpc_commitment.out index 7080285e6e03..dcdc2c6641f0 100644 --- a/tezt/_regressions/tx_rollup_rpc_commitment.out +++ b/tezt/_regressions/tx_rollup_rpc_commitment.out @@ -31,7 +31,7 @@ This sequence of operations was run: ./tezos-client --wait none submit tx rollup batch 626c6f62 to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' Node is bootstrapped. -Estimated gas: 2021.382 units (will add 100 for safety) +Estimated gas: 2021.390 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -53,12 +53,12 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2021.382 + Consumed gas: 2021.390 ./tezos-client --wait none submit tx rollup commitment 0 '[TX_ROLLUP_INBOX_HASH]' '[TX_ROLLUP_MESSAGE_RESULT_HASH]' to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' Node is bootstrapped. -Estimated gas: 3270.982 units (will add 100 for safety) +Estimated gas: 3471.272 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -69,26 +69,30 @@ 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.000655 + Fee to the baker: ꜩ0.000675 Expected counter: 3 - Gas limit: 3371 + Gas limit: 3572 Storage limit: 0 bytes Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.000655 - payload fees(the block proposer) ....... +ꜩ0.000655 + [PUBLIC_KEY_HASH] ... -ꜩ0.000675 + payload fees(the block proposer) ....... +ꜩ0.000675 Tx rollup commitment:[TX_ROLLUP_HASH], commitment 0 : messages = [TX_ROLLUP_MESSAGE_RESULT_HASH] predecessor for inbox with merkle root [TX_ROLLUP_INBOX_HASH] From: [PUBLIC_KEY_HASH] This tx rollup commit operation was successfully applied Balance updates: [PUBLIC_KEY_HASH] ....................................................... -ꜩ10000 Frozen_bonds([PUBLIC_KEY_HASH],[TX_ROLLUP_HASH]) ... +ꜩ10000 - Consumed gas: 3270.982 + Consumed gas: 3471.272 ./tezos-client rpc get '/chains/main/blocks/head/context/tx_rollup/[TX_ROLLUP_HASH]/commitment/0' { "commitment": { "level": 0, - "batches": [ "[TX_ROLLUP_MESSAGE_RESULT_HASH]" ], + "messages": + { "count": 1, + "root": "[TX_ROLLUP_MESSAGE_RESULT_HASH]", + "last_message_result_hash": + "[TX_ROLLUP_MESSAGE_RESULT_HASH]" }, "predecessor": null, "inbox_merkle_root": "[TX_ROLLUP_INBOX_HASH]" }, @@ -103,4 +107,4 @@ This sequence of operations was run: "commitment_newest_hash": "[TX_ROLLUP_COMMITMENT_HASH]", "tezos_head_level": 3, "burn_per_byte": "0", "allocated_storage": "60000", - "occupied_storage": "171", "inbox_ema": 0 } + "occupied_storage": "0", "inbox_ema": 0 } diff --git a/tezt/_regressions/tx_rollup_rpc_inbox.out b/tezt/_regressions/tx_rollup_rpc_inbox.out index 9b75de076911..db2d32fd24d6 100644 --- a/tezt/_regressions/tx_rollup_rpc_inbox.out +++ b/tezt/_regressions/tx_rollup_rpc_inbox.out @@ -31,7 +31,7 @@ This sequence of operations was run: ./tezos-client --wait none submit tx rollup batch 626c6f62 to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' Node is bootstrapped. -Estimated gas: 2021.382 units (will add 100 for safety) +Estimated gas: 2021.390 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -53,9 +53,10 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2021.382 + Consumed gas: 2021.390 ./tezos-client rpc get '/chains/main/blocks/head/context/tx_rollup/[TX_ROLLUP_HASH]/inbox/0' { "inbox_length": 1, "cumulated_size": 4, - "merkle_root": "[TX_ROLLUP_INBOX_HASH]" } + "merkle_root": "[TX_ROLLUP_INBOX_HASH]", + "orphan": true } diff --git a/tezt/_regressions/tx_rollup_rpc_pending_bonded_commitments.out b/tezt/_regressions/tx_rollup_rpc_pending_bonded_commitments.out index 44e90dd236b6..6acf4d1b652d 100644 --- a/tezt/_regressions/tx_rollup_rpc_pending_bonded_commitments.out +++ b/tezt/_regressions/tx_rollup_rpc_pending_bonded_commitments.out @@ -31,7 +31,7 @@ This sequence of operations was run: ./tezos-client --wait none submit tx rollup batch 626c6f62 to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' Node is bootstrapped. -Estimated gas: 2021.382 units (will add 100 for safety) +Estimated gas: 2021.390 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -53,12 +53,12 @@ This sequence of operations was run: This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2021.382 + Consumed gas: 2021.390 ./tezos-client --wait none submit tx rollup commitment 0 '[TX_ROLLUP_INBOX_HASH]' '[TX_ROLLUP_MESSAGE_RESULT_HASH]' to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' Node is bootstrapped. -Estimated gas: 3270.982 units (will add 100 for safety) +Estimated gas: 3471.272 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -69,20 +69,20 @@ 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.000655 + Fee to the baker: ꜩ0.000675 Expected counter: 3 - Gas limit: 3371 + Gas limit: 3572 Storage limit: 0 bytes Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.000655 - payload fees(the block proposer) ....... +ꜩ0.000655 + [PUBLIC_KEY_HASH] ... -ꜩ0.000675 + payload fees(the block proposer) ....... +ꜩ0.000675 Tx rollup commitment:[TX_ROLLUP_HASH], commitment 0 : messages = [TX_ROLLUP_MESSAGE_RESULT_HASH] predecessor for inbox with merkle root [TX_ROLLUP_INBOX_HASH] From: [PUBLIC_KEY_HASH] This tx rollup commit operation was successfully applied Balance updates: [PUBLIC_KEY_HASH] ....................................................... -ꜩ10000 Frozen_bonds([PUBLIC_KEY_HASH],[TX_ROLLUP_HASH]) ... +ꜩ10000 - Consumed gas: 3270.982 + Consumed gas: 3471.272 ./tezos-client rpc get '/chains/main/blocks/head/context/tx_rollup/[TX_ROLLUP_HASH]/pending_bonded_commitments/[PUBLIC_KEY_HASH]' diff --git a/tezt/lib_tezos/client.ml b/tezt/lib_tezos/client.ml index 9236ebc9b2a7..6e4191b2101e 100644 --- a/tezt/lib_tezos/client.ml +++ b/tezt/lib_tezos/client.ml @@ -1306,8 +1306,9 @@ module Tx_rollup = struct {value = process; run = parse} let submit_rejection ?(wait = "none") ?burn_cap ?storage_limit ?hooks ~level - ~message ~position ~path ~proof ~context_hash ~withdraw_list_hash ~rollup - ~src client = + ~message ~position ~path ~message_result_hash + ~rejected_message_result_path ~agreed_message_result_path ~proof + ~context_hash ~withdraw_list_hash ~rollup ~src client = let process = spawn_command ?hooks @@ -1317,9 +1318,13 @@ module Tx_rollup = struct @ ["at"; "level"; string_of_int level] @ ["message"; message] @ ["at"; "position"; string_of_int position] - @ ["and"; "path"; path] @ ["with"; "proof"; proof] + @ ["and"; "path"; path] + @ ["to"; "reject"; message_result_hash] + @ ["with"; "path"; rejected_message_result_path] + @ ["with"; "proof"; proof] @ ["with"; "agreed"; "context"; "hash"; context_hash] @ ["and"; "withdraw"; "list"; withdraw_list_hash] + @ ["with"; "path"; agreed_message_result_path] @ ["to"; rollup] @ ["from"; src] @ optional_arg ~name:"burn-cap" Tez.to_string burn_cap @ optional_arg ~name:"storage-limit" string_of_int storage_limit) diff --git a/tezt/lib_tezos/client.mli b/tezt/lib_tezos/client.mli index 66bfacef9317..2f585b7661b6 100644 --- a/tezt/lib_tezos/client.mli +++ b/tezt/lib_tezos/client.mli @@ -999,6 +999,9 @@ module Tx_rollup : sig message:string -> position:int -> path:string -> + message_result_hash:string -> + rejected_message_result_path:string -> + agreed_message_result_path:string -> proof:string -> context_hash:string -> withdraw_list_hash:string -> diff --git a/tezt/lib_tezos/constant.ml b/tezt/lib_tezos/constant.ml index 020339700038..e08a0551f47e 100644 --- a/tezt/lib_tezos/constant.ml +++ b/tezt/lib_tezos/constant.ml @@ -123,7 +123,7 @@ let tx_rollup_empty_withdraw_list = "txw1sFoLju3ySMAdY6v1dcHUMqJ4Zxc1kcynC8xkYgCmH6bpNSDhV" let tx_rollup_initial_message_result = - "txmr2DouKqJu5o8KEVGe6gLoiw1J3krjsxhf6C2a1kDNTTr8BdKpf2" + "txmr344vtdPzvWsfnoSd3mJ3MCFA5ehKLQs1pK9WGcX4FEACg1rVgC" (** A valid rejection proof for the initial layer2 state. *) let tx_rollup_proof_initial_state = diff --git a/tezt/lib_tezos/operation.ml b/tezt/lib_tezos/operation.ml index 9705ca115328..78f2ff114525 100644 --- a/tezt/lib_tezos/operation.ml +++ b/tezt/lib_tezos/operation.ml @@ -51,7 +51,11 @@ type manager_op_kind = message : Rollup.Tx_rollup.message; message_position : int; message_path : string list; - previous_message_result : string * string; + message_result_hash : string; + message_result_path : JSON.u; + previous_message_result_path : JSON.u; + previous_message_context_hash : string; + previous_message_withdraw_list_hash : string; } | Delegation of (* public key hash *) string @@ -138,7 +142,9 @@ let mk_delegation ~source ?counter ?(fee = 1_000) ?(gas_limit = 1040) let mk_rejection ~source ?counter ?(fee = 1_000_000) ?(gas_limit = 1_000_000) ?(storage_limit = 0) ~tx_rollup ~proof ~level ~message ~message_position - ~message_path ~previous_message_result client = + ~message_path ~message_result_hash ~message_result_path + ~previous_message_result_path ~previous_message_context_hash + ~previous_message_withdraw_list_hash client = mk_manager_op ~source ?counter ~fee ~gas_limit ~storage_limit client @@ Rejection { @@ -148,7 +154,11 @@ let mk_rejection ~source ?counter ?(fee = 1_000_000) ?(gas_limit = 1_000_000) message; message_position; message_path; - previous_message_result; + message_result_hash; + message_result_path; + previous_message_result_path; + previous_message_context_hash; + previous_message_withdraw_list_hash; } let mk_origination ~source ?counter ?(fee = 1_000_000) ?(gas_limit = 100_000) @@ -164,7 +174,9 @@ let manager_op_content_to_json_string ?(public_key = `Null) ?(delegate = `Null) ?(balance = `Null) ?(script = `Null) ?(proof = `Null) ?(rollup = `Null) ?(message = `Null) ?(message_position = `Null) ?(message_path = `Null) ?(level = `Null) - ?(previous_message_result = `Null) kind = + ?(previous_message_result = `Null) ?(message_result_hash = `Null) + ?(message_result_path = `Null) ?(previous_message_result_path = `Null) + kind = let filter = List.filter (fun (_k, v) -> v <> `Null) in return @@ `O @@ -195,6 +207,9 @@ let manager_op_content_to_json_string ("message_path", message_path); ("previous_message_result", previous_message_result); ("level", level); + ("message_result_hash", message_result_hash); + ("message_result_path", message_result_path); + ("previous_message_result_path", previous_message_result_path); ]) in match op_kind with @@ -229,7 +244,11 @@ let manager_op_content_to_json_string message; message_position; message_path; - previous_message_result; + previous_message_context_hash; + message_result_hash; + message_result_path; + previous_message_result_path; + previous_message_withdraw_list_hash; } -> let rollup = `String tx_rollup in let proof = Ezjsonm.value_from_string proof in @@ -242,10 +261,11 @@ let manager_op_content_to_json_string let previous_message_result = `O [ - ("context_hash", `String (fst previous_message_result)); - ("withdrawals_merkle_root", `String (snd previous_message_result)); + ("context_hash", `String previous_message_context_hash); + ("withdraw_list_hash", `String previous_message_withdraw_list_hash); ] in + let message_result_hash = `String message_result_hash in mk_jsonm ~rollup ~proof @@ -254,6 +274,9 @@ let manager_op_content_to_json_string ~message_position ~message_path ~previous_message_result + ~message_result_hash + ~message_result_path + ~previous_message_result_path "tx_rollup_rejection" (* construct a JSON operations with contents and branch *) @@ -430,8 +453,9 @@ let inject_transfer ?protocol ?async ?force ?wait_for_injection ?branch ~source let inject_rejection ?protocol ?async ?force ?wait_for_injection ?branch ~source ?(signer = source) ?counter ?fee ?gas_limit ?storage_limit ~tx_rollup ~proof - ~level ~message ~message_position ~message_path ~previous_message_result - client = + ~level ~message ~message_position ~message_path ~message_result_hash + ~message_result_path ~previous_message_result_path + ~previous_message_context_hash ~previous_message_withdraw_list_hash client = let* op = mk_rejection ~source @@ -445,7 +469,11 @@ let inject_rejection ?protocol ?async ?force ?wait_for_injection ?branch ~source ~message ~message_position ~message_path - ~previous_message_result + ~message_result_hash + ~message_result_path + ~previous_message_result_path + ~previous_message_context_hash + ~previous_message_withdraw_list_hash client in forge_and_inject_operation diff --git a/tezt/lib_tezos/operation.mli b/tezt/lib_tezos/operation.mli index f6e8e3371a53..279d9e419e64 100644 --- a/tezt/lib_tezos/operation.mli +++ b/tezt/lib_tezos/operation.mli @@ -126,7 +126,11 @@ val mk_rejection : message:Rollup.Tx_rollup.message -> message_position:int -> message_path:string list -> - previous_message_result:string * string -> + message_result_hash:string -> + message_result_path:JSON.u -> + previous_message_result_path:JSON.u -> + previous_message_context_hash:string -> + previous_message_withdraw_list_hash:string -> Client.t -> manager_operation_content Lwt.t @@ -438,6 +442,10 @@ val inject_rejection : message:Rollup.Tx_rollup.message -> message_position:int -> message_path:string list -> - previous_message_result:string * string -> + message_result_hash:string -> + message_result_path:JSON.u -> + previous_message_result_path:JSON.u -> + previous_message_context_hash:string -> + previous_message_withdraw_list_hash:string -> Client.t -> [> `OpHash of string] Lwt.t diff --git a/tezt/tests/tx_rollup.ml b/tezt/tests/tx_rollup.ml index b8d342c1a5cd..dc430a11f506 100644 --- a/tezt/tests/tx_rollup.ml +++ b/tezt/tests/tx_rollup.ml @@ -849,7 +849,7 @@ let test_rollup_last_commitment_is_rejected = let* () = submit_commitment ~level:0 - ~roots:[Constant.tx_rollup_initial_message_result] + ~roots:["txmr2DouKqJu5o8KEVGe6gLoiw1J3krjsxhf6C2a1kDNTTr8BdKpf2"] ~inbox_content ~predecessor:None state @@ -874,12 +874,26 @@ let test_rollup_last_commitment_is_rejected = (let (`Hex s) = Hex.of_string "blob" in s) in + let message_result_hash = + "txmr2DouKqJu5o8KEVGe6gLoiw1J3krjsxhf6C2a1kDNTTr8BdKpf2" + in + let*! rejected_message_result_path = + Rollup.commitment_merkle_tree_path + ~message_result_hashes: + [`Hash "txmr2DouKqJu5o8KEVGe6gLoiw1J3krjsxhf6C2a1kDNTTr8BdKpf2"] + ~position:0 + client + in + let agreed_message_result_path = "[]" in let*! () = submit_rejection ~level:0 ~message ~position:0 ~path:(path |> JSON.encode) + ~message_result_hash + ~rejected_message_result_path:(rejected_message_result_path |> JSON.encode) + ~agreed_message_result_path ~proof:Constant.tx_rollup_proof_initial_state ~context_hash:Constant.tx_rollup_empty_l2_context ~withdraw_list_hash:Constant.tx_rollup_empty_withdraw_list @@ -928,6 +942,13 @@ let test_rollup_wrong_rejection = client in let message_path = List.map (fun x -> JSON.as_string x) (JSON.as_list path) in + let message_result_hash = Constant.tx_rollup_initial_message_result in + let*! message_result_path = + Rollup.commitment_merkle_tree_path + ~message_result_hashes:[`Hash Constant.tx_rollup_initial_message_result] + ~position:0 + client + in (* The proof is invalid, as the submitted batch is stupid, the after hash should be the same as before. *) let* (`OpHash _op) = @@ -943,9 +964,12 @@ let test_rollup_wrong_rejection = ~message ~message_position:0 ~message_path - ~previous_message_result: - ( Constant.tx_rollup_empty_l2_context, - Constant.tx_rollup_empty_withdraw_list ) + ~message_result_hash + ~message_result_path:(JSON.unannotate message_result_path) + ~previous_message_result_path:(`A []) + ~previous_message_context_hash:Constant.tx_rollup_empty_l2_context + ~previous_message_withdraw_list_hash: + Constant.tx_rollup_empty_withdraw_list state.client in let* () = Client.bake_for client in @@ -974,7 +998,7 @@ let test_rollup_wrong_rejection = let test_rollup_wrong_path_for_rejection = Protocol.register_test ~__FILE__ - ~title:"wrong path for rejection" + ~title:"wrong message path for rejection" ~tags:["tx_rollup"; "rejection"; "batch"] @@ fun protocol -> let parameters = Parameters.{finality_period = 1; withdraw_period = 1} in @@ -996,6 +1020,13 @@ let test_rollup_wrong_path_for_rejection = let* () = repeat parameters.finality_period (fun () -> Client.bake_for client) in + let message_result_hash = Constant.tx_rollup_initial_message_result in + let*! message_result_path = + Rollup.commitment_merkle_tree_path + ~message_result_hashes:[`Hash Constant.tx_rollup_initial_message_result] + ~position:0 + client + in let*! _ = RPC.Tx_rollup.get_state ~rollup client in let* (`OpHash _op) = Operation.inject_rejection @@ -1006,9 +1037,12 @@ let test_rollup_wrong_path_for_rejection = ~message:batch ~message_position:0 ~message_path:[] - ~previous_message_result: - ( Constant.tx_rollup_empty_l2_context, - Constant.tx_rollup_empty_withdraw_list ) + ~message_result_hash + ~message_result_path:(message_result_path |> JSON.unannotate) + ~previous_message_result_path:(`A []) + ~previous_message_context_hash:Constant.tx_rollup_empty_l2_context + ~previous_message_withdraw_list_hash: + Constant.tx_rollup_empty_withdraw_list client in let* () = Client.bake_for client in @@ -1070,6 +1104,14 @@ let test_rollup_wrong_rejection_long_path = let good_path = JSON.encode good_path in let (`Batch (`Hex content)) = batch in let message = Ezjsonm.value_to_string @@ `O [("batch", `String content)] in + let message_result_hash = Constant.tx_rollup_initial_message_result in + let*! rejected_message_result_path = + Rollup.commitment_merkle_tree_path + ~message_result_hashes:[`Hash Constant.tx_rollup_initial_message_result] + ~position:0 + client + in + let agreed_message_result_path = "[]" in let*? process = Client.Tx_rollup.submit_rejection ~src:Constant.bootstrap1.alias @@ -1079,6 +1121,9 @@ let test_rollup_wrong_rejection_long_path = ~message ~position ~path:bad_path + ~message_result_hash + ~rejected_message_result_path:(rejected_message_result_path |> JSON.encode) + ~agreed_message_result_path ~context_hash:Constant.tx_rollup_empty_l2_context ~withdraw_list_hash:Constant.tx_rollup_empty_withdraw_list state.client @@ -1099,6 +1144,9 @@ let test_rollup_wrong_rejection_long_path = ~message ~position:0 ~path:good_path + ~message_result_hash + ~rejected_message_result_path:(rejected_message_result_path |> JSON.encode) + ~agreed_message_result_path ~context_hash:Constant.tx_rollup_empty_l2_context ~withdraw_list_hash:Constant.tx_rollup_empty_withdraw_list state.client -- GitLab From bcb62f6f350b932a8e55006605ccca9ff1834efd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Thir=C3=A9?= Date: Mon, 28 Mar 2022 16:51:11 +0200 Subject: [PATCH 16/20] Tezt/RPC: Add `raw_bytes` RPC --- tezt/lib_tezos/RPC.ml | 7 +++++++ tezt/lib_tezos/RPC.mli | 9 +++++++++ 2 files changed, 16 insertions(+) diff --git a/tezt/lib_tezos/RPC.ml b/tezt/lib_tezos/RPC.ml index c2333052ab2f..471331d81a21 100644 --- a/tezt/lib_tezos/RPC.ml +++ b/tezt/lib_tezos/RPC.ml @@ -710,6 +710,13 @@ module Sc_rollup = struct Client.rpc ?endpoint ?hooks GET path client end +let raw_bytes ?endpoint ?hooks ?(chain = "main") ?(block = "head") ?(path = []) + client = + let path = + ["chains"; chain; "blocks"; block; "context"; "raw"; "bytes"] @ path + in + Client.rpc ?endpoint ?hooks GET path client + module Curl = struct let curl_path_cache = ref None diff --git a/tezt/lib_tezos/RPC.mli b/tezt/lib_tezos/RPC.mli index 99e440e3fdb0..e7bf6e1f34de 100644 --- a/tezt/lib_tezos/RPC.mli +++ b/tezt/lib_tezos/RPC.mli @@ -1004,6 +1004,15 @@ module Sc_rollup : sig JSON.t Lwt.t end +val raw_bytes : + ?endpoint:Client.endpoint -> + ?hooks:Process.hooks -> + ?chain:string -> + ?block:string -> + ?path:string list -> + Client.t -> + JSON.t Lwt.t + module Curl : sig (** [get ()] returns [Some curl] where [curl ~url] returns the raw response obtained by curl when requesting [url]. Returns [None] if [curl] cannot be found. *) -- GitLab From c9750d26c3ad246403b48d5caf67808b9d0938bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Thir=C3=A9?= Date: Tue, 29 Mar 2022 11:18:44 +0200 Subject: [PATCH 17/20] Protocol/Tx_rollup: Refactor storage --- src/proto_alpha/lib_protocol/storage.ml | 45 +++++-------------- src/proto_alpha/lib_protocol/storage.mli | 16 +++---- .../tx_rollup_commitment_storage.ml | 34 +++++++------- .../lib_protocol/tx_rollup_inbox_storage.ml | 12 ++--- .../lib_protocol/tx_rollup_reveal_storage.ml | 10 ++--- tezt/tests/tx_rollup.ml | 1 + 6 files changed, 46 insertions(+), 72 deletions(-) diff --git a/src/proto_alpha/lib_protocol/storage.ml b/src/proto_alpha/lib_protocol/storage.ml index 5a114f840427..4df9084d801e 100644 --- a/src/proto_alpha/lib_protocol/storage.ml +++ b/src/proto_alpha/lib_protocol/storage.ml @@ -1416,17 +1416,11 @@ module Ticket_balance = struct end module Tx_rollup = struct - module Raw_context = - Make_subcontext (Registered) (Raw_context) - (struct - let name = ["tx_rollup"] - end) - module Indexed_context = Make_indexed_subcontext (Make_subcontext (Registered) (Raw_context) (struct - let name = ["index"] + let name = ["tx_rollup"] end)) (Make_index (Tx_rollup_repr.Index)) @@ -1439,22 +1433,14 @@ module Tx_rollup = struct module Level_context = Make_indexed_subcontext - (Make_subcontext (Registered) (Raw_context) + (Make_subcontext (Registered) (Indexed_context.Raw_context) (struct let name = ["tx_level"] end)) (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_by_level"] - end)) - (Make_index (Tx_rollup_repr.Index)) - module Inbox = - Level_tx_rollup_context.Make_carbonated_map + Level_context.Make_carbonated_map (struct let name = ["inbox"] end) @@ -1465,25 +1451,14 @@ module Tx_rollup = struct end) module Revealed_withdrawals = - Level_tx_rollup_context.Make_carbonated_map + Level_context.Make_carbonated_map (struct - let name = ["revealed_withdrawals"] + let name = ["withdrawals"] end) (Bitset) - module Level_indexed_context = - Make_indexed_subcontext - (Make_subcontext (Registered) (Raw_context) - (struct - let name = ["tx_rollup_level"] - end)) - (Pair - (Make_index - (Tx_rollup_level_repr.Index)) - (Make_index (Tx_rollup_repr.Index))) - module Commitment = - Level_indexed_context.Make_carbonated_map + Level_context.Make_carbonated_map (struct let name = ["commitment"] end) @@ -1491,16 +1466,16 @@ module Tx_rollup = struct module Bond_indexed_context = Make_indexed_subcontext - (Make_subcontext (Registered) (Raw_context) + (Make_subcontext (Registered) (Indexed_context.Raw_context) (struct - let name = ["tx_rollup_bond"] + let name = ["bond"] end)) - (Pair (Make_index (Tx_rollup_repr.Index)) (Public_key_hash_index)) + (Public_key_hash_index) module Commitment_bond = Bond_indexed_context.Make_carbonated_map (struct - let name = ["commitment_bond"] + let name = ["commitment"] end) (struct type t = int diff --git a/src/proto_alpha/lib_protocol/storage.mli b/src/proto_alpha/lib_protocol/storage.mli index 39dca57bc686..cbe4e8a3f6ce 100644 --- a/src/proto_alpha/lib_protocol/storage.mli +++ b/src/proto_alpha/lib_protocol/storage.mli @@ -633,8 +633,8 @@ module Tx_rollup : sig for a description of the actual content. *) module Inbox : Non_iterable_indexed_carbonated_data_storage - with type t := Raw_context.t * Tx_rollup_level_repr.t - and type key = Tx_rollup_repr.t + with type t := Raw_context.t * Tx_rollup_repr.t + and type key = Tx_rollup_level_repr.t and type value = Tx_rollup_inbox_repr.t (** A carbonated storage of the set of withdrawals revealed of those @@ -642,8 +642,8 @@ module Tx_rollup : sig number, which is sequentially assigned from 0. *) module Revealed_withdrawals : Non_iterable_indexed_carbonated_data_storage - with type t := Raw_context.t * Tx_rollup_level_repr.t - and type key = Tx_rollup_repr.t + with type t := Raw_context.t * Tx_rollup_repr.t + and type key = Tx_rollup_level_repr.t and type value = Bitset.t (** A rollup can have at most one commitment per rollup level. Some @@ -652,18 +652,18 @@ module Tx_rollup : sig content. *) module Commitment : Non_iterable_indexed_carbonated_data_storage - with type key = Tx_rollup_level_repr.t * Tx_rollup_repr.t + with type key = Tx_rollup_level_repr.t and type value = Tx_rollup_commitment_repr.Submitted_commitment.t - and type t := Raw_context.t + and type t := Raw_context.t * Tx_rollup_repr.t (** This stores information about which contracts have bonds for each rollup, and how many commitments those bonds stake. *) module Commitment_bond : Non_iterable_indexed_carbonated_data_storage - with type key = Tx_rollup_repr.t * Signature.public_key_hash + with type key = Signature.public_key_hash and type value = int - and type t := Raw_context.t + and type t := Raw_context.t * Tx_rollup_repr.t end module Sc_rollup : sig 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 8a0f74874698..22e8571185c6 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_commitment_storage.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_commitment_storage.ml @@ -75,15 +75,14 @@ let check_message_result {messages; _} result ~path ~index = let adjust_commitments_count ctxt tx_rollup pkh ~(dir : [`Incr | `Decr]) = let delta = match dir with `Incr -> 1 | `Decr -> -1 in - let bond_key = (tx_rollup, pkh) in - Storage.Tx_rollup.Commitment_bond.find ctxt bond_key + Storage.Tx_rollup.Commitment_bond.find (ctxt, tx_rollup) pkh >>=? fun (ctxt, commitment) -> let count = match commitment with Some count -> count + delta | None -> delta in fail_when Compare.Int.(count < 0) (Commitment_bond_negative count) >>=? fun () -> - Storage.Tx_rollup.Commitment_bond.add ctxt bond_key count + Storage.Tx_rollup.Commitment_bond.add (ctxt, tx_rollup) pkh count >>=? fun (ctxt, _, _) -> return ctxt let remove_bond : @@ -92,23 +91,22 @@ let remove_bond : Signature.public_key_hash -> Raw_context.t tzresult Lwt.t = fun ctxt tx_rollup contract -> - let bond_key = (tx_rollup, contract) in - Storage.Tx_rollup.Commitment_bond.find ctxt bond_key >>=? fun (ctxt, bond) -> + Storage.Tx_rollup.Commitment_bond.find (ctxt, tx_rollup) contract + >>=? fun (ctxt, bond) -> match bond with | None -> fail (Bond_does_not_exist contract) | Some 0 -> - Storage.Tx_rollup.Commitment_bond.remove ctxt bond_key + Storage.Tx_rollup.Commitment_bond.remove (ctxt, tx_rollup) contract >>=? fun (ctxt, _, _) -> return ctxt | Some _ -> fail (Bond_in_use contract) let slash_bond ctxt tx_rollup contract = - let bond_key = (tx_rollup, contract) in - Storage.Tx_rollup.Commitment_bond.find ctxt bond_key + Storage.Tx_rollup.Commitment_bond.find (ctxt, tx_rollup) contract >>=? fun (ctxt, bond_counter) -> match bond_counter with | None -> return (ctxt, false) | Some c -> - Storage.Tx_rollup.Commitment_bond.remove ctxt bond_key + Storage.Tx_rollup.Commitment_bond.remove (ctxt, tx_rollup) contract >>=? fun (ctxt, _, _) -> return (ctxt, Compare.Int.(0 < c)) let find : @@ -119,7 +117,7 @@ let find : (Raw_context.t * Submitted_commitment.t option) tzresult Lwt.t = fun ctxt tx_rollup state level -> if Tx_rollup_state_repr.has_valid_commitment_at state level then - Storage.Tx_rollup.Commitment.find ctxt (level, tx_rollup) + Storage.Tx_rollup.Commitment.find (ctxt, tx_rollup) level >>=? fun (ctxt, commitment) -> match commitment with | None -> @@ -158,7 +156,7 @@ let get_finalized : error (Tx_rollup_errors_repr.No_finalized_commitment_for_level {level; window})) >>?= fun () -> - Storage.Tx_rollup.Commitment.find ctxt (level, tx_rollup) + Storage.Tx_rollup.Commitment.find (ctxt, tx_rollup) level >>=? fun (ctxt, commitment) -> match commitment with | None -> fail @@ Tx_rollup_errors_repr.Commitment_does_not_exist level @@ -230,7 +228,7 @@ let add_commitment ctxt tx_rollup state pkh commitment = finalized_at = None; } in - Storage.Tx_rollup.Commitment.add ctxt (commitment.level, tx_rollup) submitted + Storage.Tx_rollup.Commitment.add (ctxt, tx_rollup) commitment.level submitted >>=? fun (ctxt, _commitment_size_alloc, _) -> (* See {{Note}} for a rationale on why ignoring storage allocation is safe. *) Tx_rollup_state_repr.record_commitment_creation @@ -247,7 +245,7 @@ let pending_bonded_commitments : Signature.public_key_hash -> (Raw_context.t * int) tzresult Lwt.t = fun ctxt tx_rollup pkh -> - Storage.Tx_rollup.Commitment_bond.find ctxt (tx_rollup, pkh) + Storage.Tx_rollup.Commitment_bond.find (ctxt, tx_rollup) pkh >|=? fun (ctxt, pending) -> (ctxt, Option.value ~default:0 pending) let has_bond : @@ -256,7 +254,7 @@ let has_bond : Signature.public_key_hash -> (Raw_context.t * bool) tzresult Lwt.t = fun ctxt tx_rollup pkh -> - Storage.Tx_rollup.Commitment_bond.find ctxt (tx_rollup, pkh) + Storage.Tx_rollup.Commitment_bond.find (ctxt, tx_rollup) pkh >|=? fun (ctxt, pending) -> (ctxt, Option.is_some pending) let finalize_commitment ctxt rollup state = @@ -278,8 +276,8 @@ let finalize_commitment ctxt rollup state = >>=? fun ctxt -> (* We update the commitment to mark it as finalized *) Storage.Tx_rollup.Commitment.update - ctxt - (oldest_inbox_level, rollup) + (ctxt, rollup) + oldest_inbox_level {commitment with finalized_at = Some current_level} >>=? fun (ctxt, _commitment_size_alloc) -> (* See {{Note}} for a rationale on why ignoring storage @@ -312,7 +310,7 @@ let remove_commitment ctxt rollup state = adjust_commitments_count ctxt rollup commitment.committer ~dir:`Decr >>=? fun ctxt -> (* We remove the commitment *) - Storage.Tx_rollup.Commitment.remove ctxt (tail, rollup) + Storage.Tx_rollup.Commitment.remove (ctxt, rollup) tail >>=? fun (ctxt, _freed_size, _existed) -> (* See {{Note}} for a rationale on why ignoring storage allocation is safe. *) @@ -350,7 +348,7 @@ let check_agreed_and_disputed_results ctxt tx_rollup state (Wrong_rejection_hash {provided = agreed; expected = `Hash expected}) >>=? fun () -> return ctxt | Some pred_level -> ( - Storage.Tx_rollup.Commitment.find ctxt (pred_level, tx_rollup) + Storage.Tx_rollup.Commitment.find (ctxt, tx_rollup) pred_level >>=? fun (ctxt, candidate) -> match candidate with | Some commitment -> 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 cf94d57c7bfa..bf978cbd4c95 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_inbox_storage.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_inbox_storage.ml @@ -33,7 +33,7 @@ let find : Tx_rollup_repr.t -> (Raw_context.t * Tx_rollup_inbox_repr.t option) tzresult Lwt.t = fun ctxt level tx_rollup -> - Storage.Tx_rollup.Inbox.find (ctxt, level) tx_rollup + Storage.Tx_rollup.Inbox.find (ctxt, tx_rollup) level let get : Raw_context.t -> @@ -74,7 +74,7 @@ let prepare_inbox : 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.get (ctxt, tx_lvl) rollup + Storage.Tx_rollup.Inbox.get (ctxt, rollup) tx_lvl >>=? fun (ctxt, metadata) -> return (ctxt, state, tx_lvl, metadata, Z.zero) | _ -> let pred_level = @@ -130,7 +130,7 @@ let prepare_inbox : Tx_rollup_state_repr.record_inbox_creation state level >>?= fun (state, tx_level, paid_storage_space_diff) -> let inbox = Tx_rollup_inbox_repr.empty in - Storage.Tx_rollup.Inbox.init (ctxt, tx_level) rollup inbox + Storage.Tx_rollup.Inbox.init (ctxt, rollup) tx_level inbox >>=? fun (ctxt, _inbox_size_alloc) -> (* Storage accounting is done by [Tx_rollup_state_repr.record_inbox_creation], so we can @@ -188,7 +188,7 @@ let append_message : (Inbox_size_would_exceed_limit rollup) >>=? fun () -> (* Checks have passed, so we can actually record in the storage. *) - Storage.Tx_rollup.Inbox.add (ctxt, tx_level) rollup new_inbox + Storage.Tx_rollup.Inbox.add (ctxt, rollup) tx_level new_inbox >>=? fun (ctxt, new_inbox_size_alloc, _) -> Tx_rollup_state_repr.adjust_storage_allocation new_state @@ -205,7 +205,7 @@ let remove : Tx_rollup_repr.t -> Raw_context.t tzresult Lwt.t = fun ctxt level rollup -> - Storage.Tx_rollup.Inbox.remove (ctxt, level) rollup + Storage.Tx_rollup.Inbox.remove (ctxt, rollup) level >>=? fun (ctxt, _freed, _) -> return ctxt let check_message_hash : @@ -217,7 +217,7 @@ let check_message_hash : Tx_rollup_inbox_repr.Merkle.path -> Raw_context.t tzresult Lwt.t = fun ctxt level tx_rollup ~position message path -> - Storage.Tx_rollup.Inbox.get (ctxt, level) tx_rollup >>=? fun (ctxt, inbox) -> + Storage.Tx_rollup.Inbox.get (ctxt, tx_rollup) level >>=? fun (ctxt, inbox) -> let message_hash = Tx_rollup_message_repr.hash_uncarbonated message in Tx_rollup_inbox_repr.Merkle.check_path path diff --git a/src/proto_alpha/lib_protocol/tx_rollup_reveal_storage.ml b/src/proto_alpha/lib_protocol/tx_rollup_reveal_storage.ml index 795f723ff864..3223990f9c03 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_reveal_storage.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_reveal_storage.ml @@ -26,22 +26,22 @@ (*****************************************************************************) let record ctxt tx_rollup level ~message_position = - Storage.Tx_rollup.Revealed_withdrawals.find (ctxt, level) tx_rollup + Storage.Tx_rollup.Revealed_withdrawals.find (ctxt, tx_rollup) level >>=? fun (ctxt, revealed_withdrawals_opt) -> Bitset.add (Option.value ~default:Bitset.empty revealed_withdrawals_opt) message_position >>?= fun revealed_withdrawals -> Storage.Tx_rollup.Revealed_withdrawals.add - (ctxt, level) - tx_rollup + (ctxt, tx_rollup) + level revealed_withdrawals >>=? fun (ctxt, _new_size, _is_new) -> return ctxt (* See {{Note}} in [Tx_rollup_commitment_storage] for a rationale on why ignoring storage allocation is safe. *) let mem ctxt tx_rollup level ~message_position = - Storage.Tx_rollup.Revealed_withdrawals.find (ctxt, level) tx_rollup + Storage.Tx_rollup.Revealed_withdrawals.find (ctxt, tx_rollup) level >>=? fun (ctxt, revealed_withdrawals_opt) -> match revealed_withdrawals_opt with | Some field -> @@ -49,7 +49,7 @@ let mem ctxt tx_rollup level ~message_position = | None -> return (ctxt, false) let remove ctxt tx_rollup level = - Storage.Tx_rollup.Revealed_withdrawals.remove (ctxt, level) tx_rollup + Storage.Tx_rollup.Revealed_withdrawals.remove (ctxt, tx_rollup) level >>=? fun (ctxt, _freed_size, _existed) -> return ctxt (* See {{Note}} in [Tx_rollup_commitment_storage] for a rationale on why ignoring storage allocation is safe. *) diff --git a/tezt/tests/tx_rollup.ml b/tezt/tests/tx_rollup.ml index dc430a11f506..cde019278d2e 100644 --- a/tezt/tests/tx_rollup.ml +++ b/tezt/tests/tx_rollup.ml @@ -752,6 +752,7 @@ let test_rollup_with_two_commitments = let* () = repeat parameters.finality_period (fun () -> Client.bake_for client) in + let* _ = RPC.raw_bytes ~path:[] 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. *) -- GitLab From 353b66e36fb2fb079da9141f7b34154bc358fcc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Thir=C3=A9?= Date: Mon, 28 Mar 2022 17:00:49 +0200 Subject: [PATCH 18/20] Tezt/Tx_rollup: Refine a test to ensure the storage is emptied --- tezt/tests/tx_rollup.ml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tezt/tests/tx_rollup.ml b/tezt/tests/tx_rollup.ml index cde019278d2e..6fa544bd7c24 100644 --- a/tezt/tests/tx_rollup.ml +++ b/tezt/tests/tx_rollup.ml @@ -831,6 +831,13 @@ let test_rollup_with_two_commitments = 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 + let* () = submit_return_bond ~src:Constant.bootstrap1.public_key_hash state in + let* json = RPC.raw_bytes ~path:["tx_rollup"] client in + let json_object = JSON.as_object json in + (* Only the state for the rollup should be allocated. *) + Check.(List.length json_object = 1) + Check.int + ~error_msg:"Expected the rollup storage containing one field. Got: %L" ; unit let test_rollup_last_commitment_is_rejected = -- GitLab From 9dbd249ce764880925be1e592d679e721e4ec221 Mon Sep 17 00:00:00 2001 From: Thomas Letan Date: Fri, 1 Apr 2022 17:45:05 +0200 Subject: [PATCH 19/20] Proto,tx_rollup: Improve TORU carbonation --- src/proto_alpha/lib_plugin/plugin.ml | 9 +- src/proto_alpha/lib_protocol/TEZOS_PROTOCOL | 5 +- src/proto_alpha/lib_protocol/alpha_context.ml | 4 +- .../lib_protocol/alpha_context.mli | 40 ++- src/proto_alpha/lib_protocol/apply.ml | 13 +- src/proto_alpha/lib_protocol/dune.inc | 25 +- src/proto_alpha/lib_protocol/merkle_list.ml | 6 + src/proto_alpha/lib_protocol/merkle_list.mli | 4 + src/proto_alpha/lib_protocol/raw_context.mli | 2 +- .../integration/operations/test_tx_rollup.ml | 90 ++++--- .../lib_protocol/tx_rollup_commitment_repr.ml | 9 +- .../tx_rollup_commitment_storage.ml | 39 +-- .../tx_rollup_commitment_storage.mli | 3 +- .../lib_protocol/tx_rollup_errors_repr.ml | 5 +- src/proto_alpha/lib_protocol/tx_rollup_gas.ml | 110 ++++++-- .../lib_protocol/tx_rollup_gas.mli | 27 +- .../lib_protocol/tx_rollup_hash_builder.ml | 68 +++++ .../lib_protocol/tx_rollup_inbox_repr.ml | 4 +- .../lib_protocol/tx_rollup_inbox_repr.mli | 8 +- .../lib_protocol/tx_rollup_inbox_storage.ml | 6 +- .../lib_protocol/tx_rollup_l2_verifier.ml | 33 +-- .../lib_protocol/tx_rollup_l2_verifier.mli | 6 +- ...der.mli => tx_rollup_message_hash_repr.ml} | 31 ++- ...der.ml => tx_rollup_message_hash_repr.mli} | 24 +- .../lib_protocol/tx_rollup_message_repr.ml | 30 --- .../lib_protocol/tx_rollup_message_repr.mli | 18 -- .../tx_rollup_message_result_hash_repr.ml | 4 +- .../tx_rollup_message_result_hash_repr.mli | 6 +- .../tx_rollup_withdraw_list_hash_repr.ml | 4 +- .../tx_rollup_withdraw_list_hash_repr.mli | 2 +- .../_regressions/tx_rollup_batch_encoding.out | 16 +- .../tx_rollup_finalize_commitment_future.out | 16 +- ...tx_rollup_finalize_commitment_no_batch.out | 4 +- ...llup_finalize_commitment_no_commitment.out | 16 +- ..._rollup_finalize_too_recent_commitment.out | 28 +- .../tx_rollup_limit_empty_batch.out | 16 +- .../tx_rollup_limit_maximum_size_batch.out | 16 +- .../tx_rollup_limit_maximum_size_inbox.out | 247 +++++++++--------- .../_regressions/tx_rollup_rpc_commitment.out | 32 +-- tezt/_regressions/tx_rollup_rpc_inbox.out | 19 +- ..._rollup_rpc_pending_bonded_commitments.out | 28 +- tezt/_regressions/tx_rollup_rpc_state.out | 7 +- 42 files changed, 638 insertions(+), 442 deletions(-) create mode 100644 src/proto_alpha/lib_protocol/tx_rollup_hash_builder.ml rename src/proto_alpha/lib_protocol/{tx_rollup_message_builder.mli => tx_rollup_message_hash_repr.ml} (75%) rename src/proto_alpha/lib_protocol/{tx_rollup_message_builder.ml => tx_rollup_message_hash_repr.mli} (77%) diff --git a/src/proto_alpha/lib_plugin/plugin.ml b/src/proto_alpha/lib_plugin/plugin.ml index c68d138d1f9a..3bf22b22044f 100644 --- a/src/proto_alpha/lib_plugin/plugin.ml +++ b/src/proto_alpha/lib_plugin/plugin.ml @@ -3059,7 +3059,7 @@ module RPC = struct ~description:"Compute the hash of a message" ~query:RPC_query.empty ~input:(obj1 (req "message" Tx_rollup_message.encoding)) - ~output:(obj1 (req "hash" Tx_rollup_message.hash_encoding)) + ~output:(obj1 (req "hash" Tx_rollup_message_hash.encoding)) RPC_path.(path / "message_hash") let merkle_tree_hash = @@ -3068,7 +3068,7 @@ module RPC = struct ~query:RPC_query.empty ~input: (obj1 - (req "message_hashes" (list Tx_rollup_message.hash_encoding))) + (req "message_hashes" (list Tx_rollup_message_hash.encoding))) ~output:(obj1 (req "hash" Tx_rollup_inbox.Merkle.root_encoding)) RPC_path.(path / "merkle_tree_hash") @@ -3078,7 +3078,7 @@ module RPC = struct ~query:RPC_query.empty ~input: (obj2 - (req "message_hashes" (list Tx_rollup_message.hash_encoding)) + (req "message_hashes" (list Tx_rollup_message_hash.encoding)) (req "position" int16)) ~output:(obj1 (req "path" Tx_rollup_inbox.Merkle.path_encoding)) RPC_path.(path / "merkle_tree_path") @@ -3152,7 +3152,8 @@ module RPC = struct Registration.register0_noctxt ~chunked:true S.Tx_rollup.Inbox.message_hash - (fun () message -> return (Tx_rollup_message.hash_uncarbonated message)) ; + (fun () message -> + return (Tx_rollup_message_hash.hash_uncarbonated message)) ; Registration.register0_noctxt ~chunked:true S.Tx_rollup.Inbox.merkle_tree_hash diff --git a/src/proto_alpha/lib_protocol/TEZOS_PROTOCOL b/src/proto_alpha/lib_protocol/TEZOS_PROTOCOL index 5dcfc5c4ca8b..53091fb4b1dd 100644 --- a/src/proto_alpha/lib_protocol/TEZOS_PROTOCOL +++ b/src/proto_alpha/lib_protocol/TEZOS_PROTOCOL @@ -26,7 +26,6 @@ "Fixed_point_repr", "Saturation_repr", "Gas_limit_repr", - "Tx_rollup_gas", "Constants_repr", "Raw_level_repr", "Fitness_repr", @@ -58,6 +57,7 @@ "Tx_rollup_withdraw_list_hash_repr", "Tx_rollup_reveal_repr", "Tx_rollup_message_repr", + "Tx_rollup_message_hash_repr", "Tx_rollup_inbox_repr", "Tx_rollup_message_result_repr", "Tx_rollup_message_result_hash_repr", @@ -85,11 +85,12 @@ "Storage_costs", "Storage_sigs", "Storage_functors", - "Tx_rollup_message_builder", "Storage", "Ticket_hash_builder", "Constants_storage", + "Tx_rollup_gas", + "Tx_rollup_hash_builder", "Level_storage", "Nonce_storage", "Seed_storage", diff --git a/src/proto_alpha/lib_protocol/alpha_context.ml b/src/proto_alpha/lib_protocol/alpha_context.ml index 28961fe72509..3e557667a504 100644 --- a/src/proto_alpha/lib_protocol/alpha_context.ml +++ b/src/proto_alpha/lib_protocol/alpha_context.ml @@ -268,7 +268,6 @@ end module Tx_rollup_message = struct include Tx_rollup_message_repr - include Tx_rollup_message_builder let make_message msg = (msg, size msg) @@ -278,6 +277,8 @@ module Tx_rollup_message = struct make_message @@ Deposit {sender; destination; ticket_hash; amount} end +module Tx_rollup_message_hash = Tx_rollup_message_hash_repr + module Tx_rollup_inbox = struct include Tx_rollup_inbox_repr include Tx_rollup_inbox_storage @@ -288,6 +289,7 @@ module Tx_rollup_commitment = struct include Tx_rollup_commitment_storage end +module Tx_rollup_hash = Tx_rollup_hash_builder module Tx_rollup_errors = Tx_rollup_errors_repr module Global_constants_storage = Global_constants_storage diff --git a/src/proto_alpha/lib_protocol/alpha_context.mli b/src/proto_alpha/lib_protocol/alpha_context.mli index 60c22baaf8e5..fa8724503ab3 100644 --- a/src/proto_alpha/lib_protocol/alpha_context.mli +++ b/src/proto_alpha/lib_protocol/alpha_context.mli @@ -1673,7 +1673,7 @@ end module Tx_rollup_withdraw_list_hash : sig include S.HASH - val hash : Tx_rollup_withdraw.t list -> t + val hash_uncarbonated : Tx_rollup_withdraw.t list -> t val empty : t end @@ -1694,7 +1694,7 @@ end module Tx_rollup_message_result_hash : sig include S.HASH - val hash : Tx_rollup_message_result.t -> t + val hash_uncarbonated : Tx_rollup_message_result.t -> t val init : t end @@ -1836,16 +1836,12 @@ module Tx_rollup_message : sig val encoding : t Data_encoding.t val pp : Format.formatter -> t -> unit +end - type hash - - val hash_encoding : hash Data_encoding.t - - val pp_hash : Format.formatter -> hash -> unit - - val hash_uncarbonated : t -> hash +module Tx_rollup_message_hash : sig + include S.HASH - val hash : context -> t -> (context * hash) tzresult + val hash_uncarbonated : Tx_rollup_message.t -> t end (** This module re-exports definitions from {!Tx_rollup_inbox_repr} and @@ -1862,9 +1858,9 @@ module Tx_rollup_inbox : sig val root_of_b58check_opt : string -> root option - val compute_path : Tx_rollup_message.hash list -> int -> path tzresult + val compute_path : Tx_rollup_message_hash.t list -> int -> path tzresult - val merklize_list : Tx_rollup_message.hash list -> root + val merklize_list : Tx_rollup_message_hash.t list -> root val path_depth : path -> int end @@ -1960,12 +1956,13 @@ module Tx_rollup_commitment : sig end val check_message_result : + context -> Compact.t -> [ `Hash of Tx_rollup_message_result_hash.t | `Result of Tx_rollup_message_result.t ] -> path:Merkle.path -> index:int -> - unit tzresult + context tzresult val add_commitment : context -> @@ -2052,6 +2049,23 @@ module Tx_rollup_commitment : sig (context * Tx_rollup_state.t) tzresult Lwt.t end +module Tx_rollup_hash : sig + val message_result : + context -> + Tx_rollup_message_result.t -> + (context * Tx_rollup_message_result_hash.t) tzresult + + val compact_commitment : + context -> + Tx_rollup_commitment.Compact.t -> + (context * Tx_rollup_commitment_hash.t) tzresult + + val withdraw_list : + context -> + Tx_rollup_withdraw.t list -> + (context * Tx_rollup_withdraw_list_hash.t) tzresult +end + module Tx_rollup_errors : sig type error += | Tx_rollup_already_exists of Tx_rollup.t diff --git a/src/proto_alpha/lib_protocol/apply.ml b/src/proto_alpha/lib_protocol/apply.ml index 7067b731c029..40e78a02f6fa 100644 --- a/src/proto_alpha/lib_protocol/apply.ml +++ b/src/proto_alpha/lib_protocol/apply.ml @@ -1323,15 +1323,15 @@ let apply_external_manager_operation_content : ([], [], ctxt) tickets_info >>=? fun (rev_withdraw_list, rev_ex_token_and_hash_list, ctxt) -> - let withdraw_list_hash = - Tx_rollup_withdraw_list_hash.hash @@ List.rev rev_withdraw_list - in + Tx_rollup_hash.withdraw_list ctxt (List.rev rev_withdraw_list) + >>?= fun (ctxt, withdraw_list_hash) -> Tx_rollup_commitment.check_message_result + ctxt commitment.commitment (`Result {context_hash; withdraw_list_hash}) ~path:message_result_path ~index:message_index - >>?= fun () -> + >>?= fun ctxt -> Tx_rollup_reveal.record ctxt tx_rollup @@ -1667,6 +1667,7 @@ let apply_external_manager_operation_content : } in Tx_rollup_l2_verifier.verify_proof + ctxt parameters message proof @@ -1674,7 +1675,7 @@ let apply_external_manager_operation_content : ~rejected:message_result_hash ~max_proof_size: (Alpha_context.Constants.tx_rollup_rejection_max_proof_size ctxt) - >>=? fun () -> + >>=? fun ctxt -> (* Proof is correct, removing *) Tx_rollup_commitment.reject_commitment ctxt tx_rollup state level >>=? fun (ctxt, state) -> @@ -1866,7 +1867,7 @@ let precheck_manager_contents (type kind) ctxt (op : kind Kind.manager contents) assert_tx_rollup_feature_enabled ctxt >>=? fun () -> let size_limit = Constants.tx_rollup_hard_size_limit_per_message ctxt in let (_message, message_size) = Tx_rollup_message.make_batch content in - Tx_rollup_gas.message_hash_cost message_size >>?= fun cost -> + Tx_rollup_gas.hash_cost message_size >>?= fun cost -> Gas.consume ctxt cost >>?= fun ctxt -> fail_unless Compare.Int.(message_size <= size_limit) diff --git a/src/proto_alpha/lib_protocol/dune.inc b/src/proto_alpha/lib_protocol/dune.inc index e9f292fcd6c2..1149940e1017 100644 --- a/src/proto_alpha/lib_protocol/dune.inc +++ b/src/proto_alpha/lib_protocol/dune.inc @@ -51,7 +51,6 @@ module CamlinternalFormatBasics = struct include CamlinternalFormatBasics end fixed_point_repr.mli fixed_point_repr.ml saturation_repr.mli saturation_repr.ml gas_limit_repr.mli gas_limit_repr.ml - tx_rollup_gas.mli tx_rollup_gas.ml constants_repr.mli constants_repr.ml raw_level_repr.mli raw_level_repr.ml fitness_repr.mli fitness_repr.ml @@ -83,6 +82,7 @@ module CamlinternalFormatBasics = struct include CamlinternalFormatBasics end tx_rollup_withdraw_list_hash_repr.mli tx_rollup_withdraw_list_hash_repr.ml tx_rollup_reveal_repr.mli tx_rollup_reveal_repr.ml tx_rollup_message_repr.mli tx_rollup_message_repr.ml + tx_rollup_message_hash_repr.mli tx_rollup_message_hash_repr.ml tx_rollup_inbox_repr.mli tx_rollup_inbox_repr.ml tx_rollup_message_result_repr.mli tx_rollup_message_result_repr.ml tx_rollup_message_result_hash_repr.mli tx_rollup_message_result_hash_repr.ml @@ -108,10 +108,11 @@ module CamlinternalFormatBasics = struct include CamlinternalFormatBasics end storage_costs.mli storage_costs.ml storage_sigs.ml storage_functors.mli storage_functors.ml - tx_rollup_message_builder.mli tx_rollup_message_builder.ml storage.mli storage.ml ticket_hash_builder.mli ticket_hash_builder.ml constants_storage.mli constants_storage.ml + tx_rollup_gas.mli tx_rollup_gas.ml + tx_rollup_hash_builder.ml level_storage.mli level_storage.ml nonce_storage.mli nonce_storage.ml seed_storage.mli seed_storage.ml @@ -237,7 +238,6 @@ module CamlinternalFormatBasics = struct include CamlinternalFormatBasics end fixed_point_repr.mli fixed_point_repr.ml saturation_repr.mli saturation_repr.ml gas_limit_repr.mli gas_limit_repr.ml - tx_rollup_gas.mli tx_rollup_gas.ml constants_repr.mli constants_repr.ml raw_level_repr.mli raw_level_repr.ml fitness_repr.mli fitness_repr.ml @@ -269,6 +269,7 @@ module CamlinternalFormatBasics = struct include CamlinternalFormatBasics end tx_rollup_withdraw_list_hash_repr.mli tx_rollup_withdraw_list_hash_repr.ml tx_rollup_reveal_repr.mli tx_rollup_reveal_repr.ml tx_rollup_message_repr.mli tx_rollup_message_repr.ml + tx_rollup_message_hash_repr.mli tx_rollup_message_hash_repr.ml tx_rollup_inbox_repr.mli tx_rollup_inbox_repr.ml tx_rollup_message_result_repr.mli tx_rollup_message_result_repr.ml tx_rollup_message_result_hash_repr.mli tx_rollup_message_result_hash_repr.ml @@ -294,10 +295,11 @@ module CamlinternalFormatBasics = struct include CamlinternalFormatBasics end storage_costs.mli storage_costs.ml storage_sigs.ml storage_functors.mli storage_functors.ml - tx_rollup_message_builder.mli tx_rollup_message_builder.ml storage.mli storage.ml ticket_hash_builder.mli ticket_hash_builder.ml constants_storage.mli constants_storage.ml + tx_rollup_gas.mli tx_rollup_gas.ml + tx_rollup_hash_builder.ml level_storage.mli level_storage.ml nonce_storage.mli nonce_storage.ml seed_storage.mli seed_storage.ml @@ -423,7 +425,6 @@ module CamlinternalFormatBasics = struct include CamlinternalFormatBasics end fixed_point_repr.mli fixed_point_repr.ml saturation_repr.mli saturation_repr.ml gas_limit_repr.mli gas_limit_repr.ml - tx_rollup_gas.mli tx_rollup_gas.ml constants_repr.mli constants_repr.ml raw_level_repr.mli raw_level_repr.ml fitness_repr.mli fitness_repr.ml @@ -455,6 +456,7 @@ module CamlinternalFormatBasics = struct include CamlinternalFormatBasics end tx_rollup_withdraw_list_hash_repr.mli tx_rollup_withdraw_list_hash_repr.ml tx_rollup_reveal_repr.mli tx_rollup_reveal_repr.ml tx_rollup_message_repr.mli tx_rollup_message_repr.ml + tx_rollup_message_hash_repr.mli tx_rollup_message_hash_repr.ml tx_rollup_inbox_repr.mli tx_rollup_inbox_repr.ml tx_rollup_message_result_repr.mli tx_rollup_message_result_repr.ml tx_rollup_message_result_hash_repr.mli tx_rollup_message_result_hash_repr.ml @@ -480,10 +482,11 @@ module CamlinternalFormatBasics = struct include CamlinternalFormatBasics end storage_costs.mli storage_costs.ml storage_sigs.ml storage_functors.mli storage_functors.ml - tx_rollup_message_builder.mli tx_rollup_message_builder.ml storage.mli storage.ml ticket_hash_builder.mli ticket_hash_builder.ml constants_storage.mli constants_storage.ml + tx_rollup_gas.mli tx_rollup_gas.ml + tx_rollup_hash_builder.ml level_storage.mli level_storage.ml nonce_storage.mli nonce_storage.ml seed_storage.mli seed_storage.ml @@ -631,7 +634,6 @@ include Tezos_raw_protocol_alpha.Main Fixed_point_repr Saturation_repr Gas_limit_repr - Tx_rollup_gas Constants_repr Raw_level_repr Fitness_repr @@ -663,6 +665,7 @@ include Tezos_raw_protocol_alpha.Main Tx_rollup_withdraw_list_hash_repr Tx_rollup_reveal_repr Tx_rollup_message_repr + Tx_rollup_message_hash_repr Tx_rollup_inbox_repr Tx_rollup_message_result_repr Tx_rollup_message_result_hash_repr @@ -688,10 +691,11 @@ include Tezos_raw_protocol_alpha.Main Storage_costs Storage_sigs Storage_functors - Tx_rollup_message_builder Storage Ticket_hash_builder Constants_storage + Tx_rollup_gas + Tx_rollup_hash_builder Level_storage Nonce_storage Seed_storage @@ -858,7 +862,6 @@ include Tezos_raw_protocol_alpha.Main fixed_point_repr.mli fixed_point_repr.ml saturation_repr.mli saturation_repr.ml gas_limit_repr.mli gas_limit_repr.ml - tx_rollup_gas.mli tx_rollup_gas.ml constants_repr.mli constants_repr.ml raw_level_repr.mli raw_level_repr.ml fitness_repr.mli fitness_repr.ml @@ -890,6 +893,7 @@ include Tezos_raw_protocol_alpha.Main tx_rollup_withdraw_list_hash_repr.mli tx_rollup_withdraw_list_hash_repr.ml tx_rollup_reveal_repr.mli tx_rollup_reveal_repr.ml tx_rollup_message_repr.mli tx_rollup_message_repr.ml + tx_rollup_message_hash_repr.mli tx_rollup_message_hash_repr.ml tx_rollup_inbox_repr.mli tx_rollup_inbox_repr.ml tx_rollup_message_result_repr.mli tx_rollup_message_result_repr.ml tx_rollup_message_result_hash_repr.mli tx_rollup_message_result_hash_repr.ml @@ -915,10 +919,11 @@ include Tezos_raw_protocol_alpha.Main storage_costs.mli storage_costs.ml storage_sigs.ml storage_functors.mli storage_functors.ml - tx_rollup_message_builder.mli tx_rollup_message_builder.ml storage.mli storage.ml ticket_hash_builder.mli ticket_hash_builder.ml constants_storage.mli constants_storage.ml + tx_rollup_gas.mli tx_rollup_gas.ml + tx_rollup_hash_builder.ml level_storage.mli level_storage.ml nonce_storage.mli nonce_storage.ml seed_storage.mli seed_storage.ml diff --git a/src/proto_alpha/lib_protocol/merkle_list.ml b/src/proto_alpha/lib_protocol/merkle_list.ml index 48c5e3c22f03..88da122fa314 100644 --- a/src/proto_alpha/lib_protocol/merkle_list.ml +++ b/src/proto_alpha/lib_protocol/merkle_list.ml @@ -25,6 +25,12 @@ type error += Merkle_list_invalid_position +let max_depth ~count_limit = + (* We assume that the Merkle_tree implemenation computes a tree in a + logarithmic size of the number of leaves. *) + let log2 n = Z.numbits (Z.of_int n) in + log2 count_limit + let _ = register_error_kind `Temporary diff --git a/src/proto_alpha/lib_protocol/merkle_list.mli b/src/proto_alpha/lib_protocol/merkle_list.mli index 39e000704bf0..2352d451b773 100644 --- a/src/proto_alpha/lib_protocol/merkle_list.mli +++ b/src/proto_alpha/lib_protocol/merkle_list.mli @@ -25,6 +25,10 @@ type error += Merkle_list_invalid_position +(** Given a list of size [count_limit], returns the maximum depth of + its merklisation. *) +val max_depth : count_limit:int -> int + module type T = sig (** The type of a Merkle list *) type t diff --git a/src/proto_alpha/lib_protocol/raw_context.mli b/src/proto_alpha/lib_protocol/raw_context.mli index fae1a0821da2..c7e306e2b3ec 100644 --- a/src/proto_alpha/lib_protocol/raw_context.mli +++ b/src/proto_alpha/lib_protocol/raw_context.mli @@ -361,7 +361,7 @@ module Tx_rollup : sig val add_message : t -> Tx_rollup_repr.t -> - Tx_rollup_message_repr.hash -> + Tx_rollup_message_hash_repr.t -> t * Tx_rollup_inbox_repr.Merkle.root end 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 82332d560372..e8bbf457162f 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 @@ -132,8 +132,8 @@ let parsing_tests = ("data", "contracts/tx_rollup_parse_data.tz"); ] -let message_hash_testable : Tx_rollup_message.hash Alcotest.testable = - Alcotest.testable Tx_rollup_message.pp_hash ( = ) +let message_hash_testable : Tx_rollup_message_hash.t Alcotest.testable = + Alcotest.testable Tx_rollup_message_hash.pp ( = ) let sint_testable : _ Saturation_repr.t Alcotest.testable = Alcotest.testable Saturation_repr.pp ( = ) @@ -356,12 +356,12 @@ let make_incomplete_commitment_for_batch context level tx_rollup withdraw_list = let messages = List.mapi (fun i v -> - Tx_rollup_message_result_hash.hash + Tx_rollup_message_result_hash.hash_uncarbonated { context_hash = v; withdraw_list_hash = List.assq i withdraw_list |> Option.value ~default:[] - |> Tx_rollup_withdraw_list_hash.hash; + |> Tx_rollup_withdraw_list_hash.hash_uncarbonated; }) batches_result in @@ -694,7 +694,8 @@ let test_add_batch () = >>=? fun ((contract, balance), state, tx_rollup, b) -> Context.Tx_rollup.inbox (B b) tx_rollup Tx_rollup_level.root >>=? fun inbox -> let contents_hash = - Tx_rollup_message.(make_batch contents |> fst |> hash_uncarbonated) + Tx_rollup_message.make_batch contents + |> fst |> Tx_rollup_message_hash.hash_uncarbonated in let merkle_root = Tx_rollup_inbox.Merkle.merklize_list [contents_hash] in let expected_inbox = @@ -779,11 +780,11 @@ let test_add_two_batches () = >>=? fun inbox -> Incremental.begin_construction b >>=? fun _incr -> let contents1_hash = - Tx_rollup_message.hash_uncarbonated + Tx_rollup_message_hash.hash_uncarbonated (Tx_rollup_message.make_batch contents1 |> fst) in let contents2_hash = - Tx_rollup_message.hash_uncarbonated + Tx_rollup_message_hash.hash_uncarbonated (Tx_rollup_message.make_batch contents2 |> fst) in let merkle_root = @@ -895,7 +896,7 @@ let test_inbox_count_too_big () = consumed by an operation. We set a lower (arbitrary) limit to be able to reach the size limit of an operation. *) Op.tx_rollup_submit_batch - ~gas_limit:(Gas.Arith.integral_of_int_exn 2_500) + ~gas_limit:(Gas.Arith.integral_of_int_exn 3_500) ~counter (I i) contract @@ -988,7 +989,7 @@ let test_valid_deposit () = in let merkle_root = Tx_rollup_inbox.Merkle.merklize_list - [Tx_rollup_message.hash_uncarbonated message] + [Tx_rollup_message_hash.hash_uncarbonated message] in let expected_inbox = Tx_rollup_inbox.{inbox_length = 1; cumulated_size; merkle_root} @@ -1508,7 +1509,7 @@ let test_commitment_duplication () = [Bytes.make 20 '1'; Bytes.make 20 '2'] |> List.map (fun hash -> let context_hash = Context_hash.hash_bytes [hash] in - Tx_rollup_message_result_hash.hash + Tx_rollup_message_result_hash.hash_uncarbonated { context_hash; withdraw_list_hash = Tx_rollup_withdraw_list_hash.empty; @@ -1585,7 +1586,7 @@ let test_commit_current_inbox () = Incremental.begin_construction b >>=? fun i -> let contents = "batch" in let (message, _) = Tx_rollup_message.make_batch contents in - let message_hash = Tx_rollup_message.hash_uncarbonated message in + let message_hash = Tx_rollup_message_hash.hash_uncarbonated message in let inbox_hash = Tx_rollup_inbox.Merkle.merklize_list [message_hash] in Op.tx_rollup_submit_batch (I i) contract1 tx_rollup contents >>=? fun operation -> @@ -2160,7 +2161,7 @@ module Rejection = struct commitment with messages = [ - Tx_rollup_message_result_hash.hash + Tx_rollup_message_result_hash.hash_uncarbonated { context_hash = Context_hash.of_b58check_exn @@ -2279,10 +2280,11 @@ module Rejection = struct in let* hash_tree = hash_tree_from_store store in let result_hash = - Tx_rollup_message_result_hash.hash + Tx_rollup_message_result_hash.hash_uncarbonated { context_hash = hash_tree; - withdraw_list_hash = Tx_rollup_withdraw_list_hash.hash withdraws; + withdraw_list_hash = + Tx_rollup_withdraw_list_hash.hash_uncarbonated withdraws; } in return (store, result_hash :: rev_results)) @@ -2364,7 +2366,7 @@ module Rejection = struct originate b account >>=? fun (b, tx_rollup) -> make_deposit b tx_rollup account >>=? fun (b, deposit, l2_account, ticket_hash) -> - let deposit_hash = Tx_rollup_message.hash_uncarbonated deposit in + let deposit_hash = Tx_rollup_message_hash.hash_uncarbonated deposit in let message_path = match Tx_rollup_inbox.Merkle.(compute_path [deposit_hash] 0) with | Error _ -> assert false @@ -2476,7 +2478,7 @@ module Rejection = struct ~signers:[sk] [(Bls_pk pk, None, [(addr, ticket_hash, 1L)])] in - let message_hash = Tx_rollup_message.hash_uncarbonated message in + let message_hash = Tx_rollup_message_hash.hash_uncarbonated message in let message_path = match Tx_rollup_inbox.Merkle.(compute_path [message_hash] 0) with | Error _ -> assert false @@ -2532,7 +2534,7 @@ module Rejection = struct ~signers:[sk] [(Bls_pk pk, None, [(addr, ticket_hash, 1L)])] in - let message_hash = Tx_rollup_message.hash_uncarbonated message in + let message_hash = Tx_rollup_message_hash.hash_uncarbonated message in let message_path = match Tx_rollup_inbox.Merkle.(compute_path [message_hash] 0) with | Error _ -> assert false @@ -2597,7 +2599,7 @@ module Rejection = struct ~signers:[random_sk] [(Bls_pk pk, None, [(addr, ticket_hash, 1L)])] in - let message_hash = Tx_rollup_message.hash_uncarbonated message in + let message_hash = Tx_rollup_message_hash.hash_uncarbonated message in let message_path = match Tx_rollup_inbox.Merkle.(compute_path [message_hash] 0) with | Error _ -> assert false @@ -2647,7 +2649,7 @@ module Rejection = struct init_with_invalid_commitment () >>=? fun (i, contract, tx_rollup, level, message, commitment) -> let (msg, _) = Tx_rollup_message.make_batch message in - let message_hash = Tx_rollup_message.hash_uncarbonated msg in + let message_hash = Tx_rollup_message_hash.hash_uncarbonated msg in let message_path = match Tx_rollup_inbox.Merkle.(compute_path [message_hash] 0) with | Error _ -> assert false @@ -2679,7 +2681,7 @@ module Rejection = struct init_with_valid_commitment () >>=? fun (i, contract, tx_rollup, level, message, commitment) -> let (msg, _) = Tx_rollup_message.make_batch message in - let message_hash = Tx_rollup_message.hash_uncarbonated msg in + let message_hash = Tx_rollup_message_hash.hash_uncarbonated msg in let message_path = match Tx_rollup_inbox.Merkle.(compute_path [message_hash] 0) with | Error _ -> assert false @@ -2723,7 +2725,7 @@ module Rejection = struct withdraw_list_hash = Tx_rollup_withdraw_list_hash.empty; } in - let message_hash = Tx_rollup_message.hash_uncarbonated msg in + let message_hash = Tx_rollup_message_hash.hash_uncarbonated msg in let message_path = match Tx_rollup_inbox.Merkle.(compute_path [message_hash] 0) with | Error _ -> assert false @@ -2754,7 +2756,8 @@ module Rejection = struct (Tx_rollup_errors.Wrong_rejection_hash { provided = - Tx_rollup_message_result_hash.hash previous_message_result; + Tx_rollup_message_result_hash.hash_uncarbonated + previous_message_result; expected = `Hash (Tx_rollup_message_result_hash.of_b58check_exn @@ -2777,7 +2780,7 @@ module Rejection = struct Incremental.begin_construction b >>=? fun i -> let level = Tx_rollup_level.root in let (message, _size) = Tx_rollup_message.make_batch message in - let message_hash = Tx_rollup_message.hash_uncarbonated message in + let message_hash = Tx_rollup_message_hash.hash_uncarbonated message in let message_path = match Tx_rollup_inbox.Merkle.(compute_path [message_hash] 0) with | Error _ -> assert false @@ -2827,7 +2830,7 @@ module Rejection = struct Op.tx_rollup_finalize (I i) contract tx_rollup >>=? fun op -> Incremental.add_operation i op >>=? fun i -> let (message, _size) = Tx_rollup_message.make_batch message in - let message_hash = Tx_rollup_message.hash_uncarbonated message in + let message_hash = Tx_rollup_message_hash.hash_uncarbonated message in let message_path = match Tx_rollup_inbox.Merkle.(compute_path [message_hash] 0) with | Error _ -> assert false @@ -2867,12 +2870,14 @@ module Rejection = struct init_with_valid_commitment () >>=? fun (i, contract1, tx_rollup, level, prev_message, commitment) -> let (prev_message, _size) = Tx_rollup_message.make_batch prev_message in - let prev_message_hash = Tx_rollup_message.hash_uncarbonated prev_message in + let prev_message_hash = + Tx_rollup_message_hash.hash_uncarbonated prev_message + in let expected_root = Tx_rollup_inbox.Merkle.merklize_list [prev_message_hash] in let (message, _size) = Tx_rollup_message.make_batch "wrong message" in - let message_hash = Tx_rollup_message.hash_uncarbonated message in + let message_hash = Tx_rollup_message_hash.hash_uncarbonated message in let message_path = match Tx_rollup_inbox.Merkle.(compute_path [message_hash] 0) with | Error _ -> assert false @@ -2911,7 +2916,7 @@ module Rejection = struct init_with_valid_commitment () >>=? fun (i, contract1, tx_rollup, level, message, _commitment) -> let (message, _size) = Tx_rollup_message.make_batch message in - let message_hash = Tx_rollup_message.hash_uncarbonated message in + let message_hash = Tx_rollup_message_hash.hash_uncarbonated message in let message_path = match Tx_rollup_inbox.Merkle.(compute_path [message_hash] 0) with | Error _ -> assert false @@ -2977,7 +2982,9 @@ module Rejection = struct ticket_hash (Tx_rollup_l2_qty.of_int64_exn 10L) in - let message_hash = Tx_rollup_message.hash_uncarbonated deposit_message in + let message_hash = + Tx_rollup_message_hash.hash_uncarbonated deposit_message + in let message_path = match Tx_rollup_inbox.Merkle.(compute_path [message_hash] 0) with | Error _ -> assert false @@ -3075,7 +3082,7 @@ module Rejection = struct ticket_hash (Tx_rollup_l2_qty.of_int64_exn 10L) in - let deposit_hash = Tx_rollup_message.hash_uncarbonated deposit in + let deposit_hash = Tx_rollup_message_hash.hash_uncarbonated deposit in let message_path = match Tx_rollup_inbox.Merkle.(compute_path [deposit_hash] 0) with | Error _ -> assert false @@ -3146,7 +3153,7 @@ module Rejection = struct >>=? fun (b, account) -> originate b account >>=? fun (b, tx_rollup) -> make_deposit b tx_rollup account >>=? fun (b, deposit, _, _) -> - let deposit_hash = Tx_rollup_message.hash_uncarbonated deposit in + let deposit_hash = Tx_rollup_message_hash.hash_uncarbonated deposit in let message_path = match Tx_rollup_inbox.Merkle.(compute_path [deposit_hash] 0) with | Error _ -> assert false @@ -3245,7 +3252,7 @@ let test_state () = (* let pkh = is_implicit_exn account1 in *) let contents = "bogus" in let (message, _) = Tx_rollup_message.make_batch contents in - let message_hash = Tx_rollup_message.hash_uncarbonated message in + let message_hash = Tx_rollup_message_hash.hash_uncarbonated message in (match Tx_rollup_inbox.Merkle.compute_path [message_hash] 0 with | Ok message_path -> return message_path | _ -> assert false) @@ -3345,7 +3352,10 @@ let test_state () = { commit1 with messages = - [Tx_rollup_message_result_hash.hash Rejection.previous_message_result]; + [ + Tx_rollup_message_result_hash.hash_uncarbonated + Rejection.previous_message_result; + ]; } in let commit2 = @@ -3397,7 +3407,7 @@ let test_state_with_deleted () = originate b account1 >>=? fun (b, tx_rollup) -> let contents = "bogus" in let (message, _) = Tx_rollup_message.make_batch contents in - let message_hash = Tx_rollup_message.hash_uncarbonated message in + let message_hash = Tx_rollup_message_hash.hash_uncarbonated message in (match Tx_rollup_inbox.Merkle.compute_path [message_hash] 0 with | Ok message_path -> return message_path | _ -> assert false) @@ -3417,7 +3427,10 @@ let test_state_with_deleted () = { level = Tx_rollup_level.root; messages = - [Tx_rollup_message_result_hash.hash Rejection.previous_message_result]; + [ + Tx_rollup_message_result_hash.hash_uncarbonated + Rejection.previous_message_result; + ]; predecessor = None; inbox_merkle_root = inbox_hash; } @@ -3487,7 +3500,7 @@ let test_state_message_storage_preallocation () = Incremental.begin_construction b >>=? fun i -> let ctxt = Incremental.alpha_ctxt i in let (message, _) = Tx_rollup_message.make_batch "bogus" in - let message_hash = Tx_rollup_message.hash_uncarbonated message in + let message_hash = Tx_rollup_message_hash.hash_uncarbonated message in let _inbox_hash = Tx_rollup_inbox.Merkle.merklize_list [message_hash] in let state = Tx_rollup_state.initial_state ~pre_allocated_storage:Z.zero in let occupied_storage_before = @@ -4618,11 +4631,12 @@ module Withdraw = struct Tx_rollup_message_result. { context_hash = after; - withdraw_list_hash = Tx_rollup_withdraw_list_hash.hash m1_withdrawals; + withdraw_list_hash = + Tx_rollup_withdraw_list_hash.hash_uncarbonated m1_withdrawals; } in let message_result_hash = - Tx_rollup_message_result_hash.hash message_result + Tx_rollup_message_result_hash.hash_uncarbonated message_result in let commitment = {commitment with messages = [message_result_hash]} in Op.tx_rollup_commit ctxt account tx_rollup commitment >>=? fun operation -> @@ -4636,7 +4650,7 @@ module Withdraw = struct let message_path = assert_ok Tx_rollup_inbox.Merkle.( - compute_path [Tx_rollup_message.hash_uncarbonated message] 0) + compute_path [Tx_rollup_message_hash.hash_uncarbonated message] 0) in let (message_result_hash, message_result_path) = Rejection.make_rejection_param commitment ~index:0 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 2774747ce23c..6de7e88e1695 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_commitment_repr.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_commitment_repr.ml @@ -178,12 +178,13 @@ module Full = struct let compact full = map_template (fun list -> + let root = Merkle.compute list in List.fold_left - (fun (acc, tree, _) m -> (acc + 1, Merkle.snoc tree m, m)) - (0, Merkle.nil, Tx_rollup_message_result_hash_repr.zero) + (fun (acc, _) m -> (acc + 1, m)) + (0, Tx_rollup_message_result_hash_repr.zero) list - |> fun (count, tree, last_result_message_hash) -> - Compact.{count; root = Merkle.root tree; last_result_message_hash}) + |> fun (count, last_result_message_hash) -> + Compact.{count; root; last_result_message_hash}) full end 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 22e8571185c6..ca12748bf2f8 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_commitment_storage.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_commitment_storage.ml @@ -50,12 +50,12 @@ open Tx_rollup_errors_repr *) -let check_message_result {messages; _} result ~path ~index = - let computed = - match result with - | `Hash hash -> hash - | `Result result -> Tx_rollup_message_result_hash_repr.hash result - in +let check_message_result ctxt {messages; _} result ~path ~index = + (match result with + | `Hash hash -> ok (ctxt, hash) + | `Result result -> Tx_rollup_hash_builder.message_result ctxt result) + >>? fun (ctxt, computed) -> + Tx_rollup_gas.consume_check_path_commitment_cost ctxt >>? fun ctxt -> let cond = match Merkle.check_path @@ -72,6 +72,7 @@ let check_message_result {messages; _} result ~path ~index = Tx_rollup_errors_repr.( Wrong_rejection_hash {provided = computed; expected = `Valid_path (messages.root, index)}) + >>? fun () -> ok ctxt let adjust_commitments_count ctxt tx_rollup pkh ~(dir : [`Incr | `Decr]) = let delta = match dir with `Incr -> 1 | `Decr -> -1 in @@ -189,9 +190,8 @@ let check_commitment_predecessor ctxt state commitment = | (None, None) -> return ctxt | (provided, expected) -> fail (Wrong_predecessor_hash {provided; expected}) -let check_commitment_batches_and_merkle_root ctxt tx_rollup state commitment = - Tx_rollup_inbox_storage.get ctxt commitment.level tx_rollup - >>=? fun (ctxt, {inbox_length; merkle_root; _}) -> +let check_commitment_batches_and_merkle_root ctxt state inbox commitment = + let Tx_rollup_inbox_repr.{inbox_length; merkle_root; _} = inbox in fail_unless Compare.List_length_with.(commitment.messages = inbox_length) Wrong_batch_count @@ -214,11 +214,16 @@ let add_commitment ctxt tx_rollup state pkh commitment = let current_level = (Raw_context.current_level ctxt).level in check_commitment_level current_level state commitment >>?= fun () -> check_commitment_predecessor ctxt state commitment >>=? fun ctxt -> - check_commitment_batches_and_merkle_root ctxt tx_rollup state commitment + Tx_rollup_inbox_storage.get ctxt commitment.level tx_rollup + >>=? fun (ctxt, inbox) -> + check_commitment_batches_and_merkle_root ctxt state inbox commitment >>=? fun (ctxt, state) -> (* Everything has been sorted out, let’s update the storage *) + Tx_rollup_gas.consume_compact_commitment_cost ctxt inbox.inbox_length + >>?= fun ctxt -> let commitment = Tx_rollup_commitment_repr.Full.compact commitment in - let commitment_hash = Tx_rollup_commitment_repr.Compact.hash commitment in + Tx_rollup_hash_builder.compact_commitment ctxt commitment + >>?= fun (ctxt, commitment_hash) -> let submitted : Tx_rollup_commitment_repr.Submitted_commitment.t = { commitment; @@ -333,13 +338,15 @@ let check_agreed_and_disputed_results ctxt tx_rollup state Tx_rollup_state_repr.check_level_can_be_rejected state commitment.level >>?= fun () -> check_message_result + ctxt commitment (`Hash disputed_result) ~path:disputed_result_path ~index:disputed_position - >>?= fun () -> + >>?= fun ctxt -> if Compare.Int.(disputed_position = 0) then - let agreed = Tx_rollup_message_result_hash_repr.hash agreed_result in + Tx_rollup_hash_builder.message_result ctxt agreed_result + >>?= fun (ctxt, agreed) -> match Tx_rollup_level_repr.pred commitment.level with | None -> let expected = Tx_rollup_message_result_hash_repr.init in @@ -371,11 +378,12 @@ let check_agreed_and_disputed_results ctxt tx_rollup state | None -> fail (Internal_error "Missing commitment predecessor"))) else check_message_result + ctxt commitment (`Result agreed_result) ~path:agreed_result_path ~index:(disputed_position - 1) - >>?= fun () -> return ctxt + >>?= fun ctxt -> return ctxt let reject_commitment ctxt rollup state level = Tx_rollup_state_repr.check_level_can_be_rejected state level >>?= fun () -> @@ -385,8 +393,7 @@ let reject_commitment ctxt rollup state level = find ctxt rollup state pred_level >>=? fun (ctxt, pred_commitment) -> let pred_hash = Option.map - (fun (x : Submitted_commitment.t) -> - Tx_rollup_commitment_repr.Compact.hash x.commitment) + (fun (x : Submitted_commitment.t) -> x.commitment_hash) pred_commitment in return (ctxt, pred_hash) 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 2344a6d2ccb9..87c9a5c71bb1 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_commitment_storage.mli +++ b/src/proto_alpha/lib_protocol/tx_rollup_commitment_storage.mli @@ -29,12 +29,13 @@ to commitments for transaction rollups. *) val check_message_result : + Raw_context.t -> Tx_rollup_commitment_repr.Compact.t -> [ `Hash of Tx_rollup_message_result_hash_repr.t | `Result of Tx_rollup_message_result_repr.t ] -> path:Tx_rollup_commitment_repr.Merkle.path -> index:int -> - unit tzresult + Raw_context.t tzresult (** [add_commitment context tx_rollup contract commitment] adds a commitment to a rollup. It returns the new context, and the new diff --git a/src/proto_alpha/lib_protocol/tx_rollup_errors_repr.ml b/src/proto_alpha/lib_protocol/tx_rollup_errors_repr.ml index d22122514f95..016dbc8f0970 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_errors_repr.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_errors_repr.ml @@ -92,10 +92,7 @@ type error += | No_withdrawals_to_dispatch let check_path_depth kind provided ~count_limit = - (* We assume that the Merkle_tree implemenation computes a tree in a - logarithmic size of the number of leaves. *) - let log2 n = Z.numbits (Z.of_int n) in - let limit = log2 count_limit in + let limit = Merkle_list.max_depth ~count_limit in error_when Compare.Int.(limit < provided) @@ Wrong_path_depth {kind; provided; limit} diff --git a/src/proto_alpha/lib_protocol/tx_rollup_gas.ml b/src/proto_alpha/lib_protocol/tx_rollup_gas.ml index fdfabbbec72a..afc2ff63478e 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_gas.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_gas.ml @@ -25,29 +25,109 @@ (* *) (*****************************************************************************) -type error += Tx_rollup_negative_message_size +type error += Tx_rollup_negative_input_size module S = Saturation_repr -(** The same model as in {!Michelson_v1_gas.N_IBlake2b}. *) -let message_hash_cost msg_size = - if Compare.Int.(0 <= msg_size) then - let ( + ) = S.add in - let v0 = Saturation_repr.safe_int msg_size in - let cost_N_IBlake2b = S.safe_int 430 + v0 + S.shift_right v0 3 in - ok @@ Gas_limit_repr.atomic_step_cost cost_N_IBlake2b - else error Tx_rollup_negative_message_size +(** The model in {!Michelson_v1_gas.N_IBlake2b}, plus the allocation + of bytes from {!Storage_functor}. *) +let hash_cost input_size = + error_unless Compare.Int.(0 <= input_size) Tx_rollup_negative_input_size + >>? fun () -> + let ( + ) = S.add in + let cost_serialization = Gas_limit_repr.alloc_mbytes_cost input_size in + let v0 = Saturation_repr.safe_int input_size in + let cost_N_IBlake2b = S.safe_int 430 + v0 + S.shift_right v0 3 in + let cost_blake2b = Gas_limit_repr.atomic_step_cost cost_N_IBlake2b in + ok @@ (cost_serialization + cost_blake2b) + +(** Model from {!Ticket_costs.cost_compare_ticket_hash} since they are + Blake2B hashes too. *) +let compare_blake2b_hash = S.safe_int 10 + +let check_path_cost element_size path_depth = + let ( + ) = S.add in + error_unless Compare.Int.(0 <= path_depth) Tx_rollup_negative_input_size + >>? fun () -> + (* We hash the element *) + hash_cost element_size >>? fun element_hash_cost -> + (* At each step of the way, we hash 2 hashes together *) + hash_cost 64 >>? fun hash_cost -> + let rec acc_hash_cost acc i = + if Compare.Int.(i <= 0) then acc else acc_hash_cost (hash_cost + acc) (i - 1) + in + + ok (element_hash_cost + acc_hash_cost compare_blake2b_hash path_depth) + +let consume_check_path_inbox_cost ctxt = + let count_limit = Constants_storage.tx_rollup_max_messages_per_inbox ctxt in + let max_depth = Merkle_list.max_depth ~count_limit in + check_path_cost Tx_rollup_prefixes.message_hash.hash_size max_depth + >>? fun cost -> Raw_context.consume_gas ctxt cost + +let consume_check_path_commitment_cost ctxt = + let count_limit = Constants_storage.tx_rollup_max_messages_per_inbox ctxt in + let max_depth = Merkle_list.max_depth ~count_limit in + check_path_cost Tx_rollup_prefixes.message_result_hash.hash_size max_depth + >>? fun cost -> Raw_context.consume_gas ctxt cost + +let snoc_cost element_size max_depth = + let ( + ) = S.add in + error_unless Compare.Int.(0 <= max_depth) Tx_rollup_negative_input_size + >>? fun () -> + (* We hash the element *) + hash_cost element_size >>? fun element_hash_cost -> + (* We consider an over-approximation where the tree is already at it + maximum height *) + hash_cost 64 >>? fun hash_cost -> + let rec acc_hash_cost acc i = + if Compare.Int.(i <= 0) then acc else acc_hash_cost (hash_cost + acc) (i - 1) + in + + ok (element_hash_cost + acc_hash_cost (S.safe_int 0) max_depth) + +let consume_add_message_cost ctxt = + let count_limit = Constants_storage.tx_rollup_max_messages_per_inbox ctxt in + let max_depth = Merkle_list.max_depth ~count_limit in + snoc_cost Tx_rollup_prefixes.message_hash.hash_size max_depth >>? fun cost -> + Raw_context.consume_gas ctxt cost + +let compute_cost element_size size = + let ( + ) = S.add in + let ( * ) = S.mul in + hash_cost element_size >>? fun element_hash_cost -> + hash_cost 64 >>? fun inner_hash_cost -> + ok (element_hash_cost + (S.safe_int 2 * S.safe_int size * inner_hash_cost)) + +let consume_compact_commitment_cost ctxt n = + compute_cost Tx_rollup_prefixes.message_result_hash.hash_size n + >>? fun cost -> Raw_context.consume_gas ctxt cost + +let hash ~hash_f ctxt encoding input = + match Data_encoding.Binary.to_bytes_opt encoding input with + | Some buffer -> + let len = Bytes.length buffer in + hash_cost len >>? fun cost -> + Raw_context.consume_gas ctxt cost >>? fun ctxt -> + ok (ctxt, hash_f [buffer]) + | None -> + error + (Tx_rollup_errors_repr.Internal_error + "Cannot serialize input to hash function") let () = let open Data_encoding in (* Tx_rollup_negative_message_size *) register_error_kind `Permanent - ~id:"tx_rollup_negative_message_size" - ~title:"The protocol has computed a negative size for an inbox messages" + ~id:"tx_rollup_negative_input_size" + ~title: + "The protocol has computed a negative size for the input of a hash \ + function" ~description: - "The protocol has computed a negative size for an inbox messages. This \ - is an internal error, and denotes a bug in the protocol implementation." + "The protocol has computed a negative size for the input of a hash \ + function. This is an internal error, and denotes a bug in the protocol \ + implementation." unit - (function Tx_rollup_negative_message_size -> Some () | _ -> None) - (fun () -> Tx_rollup_negative_message_size) + (function Tx_rollup_negative_input_size -> Some () | _ -> None) + (fun () -> Tx_rollup_negative_input_size) diff --git a/src/proto_alpha/lib_protocol/tx_rollup_gas.mli b/src/proto_alpha/lib_protocol/tx_rollup_gas.mli index fe415f9618aa..0f0139c8cf04 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_gas.mli +++ b/src/proto_alpha/lib_protocol/tx_rollup_gas.mli @@ -25,10 +25,27 @@ (* *) (*****************************************************************************) -type error += Tx_rollup_negative_message_size +type error += Tx_rollup_negative_input_size -(** [message_hash_cost size] returns the cost of gas for hashing a - message of [size] bytes. +(** A generic helper to hash an input *) +val hash : + hash_f:(bytes list -> 'b) -> + Raw_context.t -> + 'a Data_encoding.t -> + 'a -> + (Raw_context.t * 'b) tzresult - Returns [Tx_rollup_negative_message_size] iff [size < 0]. *) -val message_hash_cost : int -> Gas_limit_repr.cost tzresult +(** [hash_cost size] returns the cost of gas for hashing a buffer of + [size] bytes. + + Returns [Tx_rollup_input_message_size] iff [size < 0]. *) +val hash_cost : int -> Gas_limit_repr.cost tzresult + +val consume_check_path_inbox_cost : Raw_context.t -> Raw_context.t tzresult + +val consume_check_path_commitment_cost : Raw_context.t -> Raw_context.t tzresult + +val consume_add_message_cost : Raw_context.t -> Raw_context.t tzresult + +val consume_compact_commitment_cost : + Raw_context.t -> int -> Raw_context.t tzresult diff --git a/src/proto_alpha/lib_protocol/tx_rollup_hash_builder.ml b/src/proto_alpha/lib_protocol/tx_rollup_hash_builder.ml new file mode 100644 index 000000000000..c623e15ff150 --- /dev/null +++ b/src/proto_alpha/lib_protocol/tx_rollup_hash_builder.ml @@ -0,0 +1,68 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2022 Nomadic Labs *) +(* *) +(* 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. *) +(* *) +(*****************************************************************************) + +let message : + Raw_context.t -> + Tx_rollup_message_repr.t -> + (Raw_context.t * Tx_rollup_message_hash_repr.t) tzresult = + fun ctxt input -> + Tx_rollup_gas.hash + ~hash_f:Tx_rollup_message_hash_repr.hash_bytes + ctxt + Tx_rollup_message_repr.encoding + input + +let message_result : + Raw_context.t -> + Tx_rollup_message_result_repr.t -> + (Raw_context.t * Tx_rollup_message_result_hash_repr.t) tzresult = + fun ctxt input -> + Tx_rollup_gas.hash + ~hash_f:Tx_rollup_message_result_hash_repr.hash_bytes + ctxt + Tx_rollup_message_result_repr.encoding + input + +let compact_commitment : + Raw_context.t -> + Tx_rollup_commitment_repr.Compact.t -> + (Raw_context.t * Tx_rollup_commitment_repr.Hash.t) tzresult = + fun ctxt input -> + Tx_rollup_gas.hash + ~hash_f:Tx_rollup_commitment_repr.Hash.hash_bytes + ctxt + Tx_rollup_commitment_repr.Compact.encoding + input + +let withdraw_list : + Raw_context.t -> + Tx_rollup_withdraw_repr.t list -> + (Raw_context.t * Tx_rollup_withdraw_list_hash_repr.t) tzresult = + fun ctxt input -> + Tx_rollup_gas.hash + ~hash_f:Tx_rollup_withdraw_list_hash_repr.hash_bytes + ctxt + (Data_encoding.list Tx_rollup_withdraw_repr.encoding) + input 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 19b98fdf44b0..808dc32a1ab6 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_inbox_repr.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_inbox_repr.ml @@ -26,10 +26,10 @@ (*****************************************************************************) module El = struct - type t = Tx_rollup_message_repr.hash + type t = Tx_rollup_message_hash_repr.t let to_bytes = - Data_encoding.Binary.to_bytes_exn Tx_rollup_message_repr.hash_encoding + Data_encoding.Binary.to_bytes_exn Tx_rollup_message_hash_repr.encoding end module Prefix = struct 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 beeeed082498..4d3d30e1a320 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_inbox_repr.mli +++ b/src/proto_alpha/lib_protocol/tx_rollup_inbox_repr.mli @@ -50,19 +50,19 @@ module Merkle : sig val path_encoding : path Data_encoding.t - val add_message : tree -> Tx_rollup_message_repr.hash -> tree + val add_message : tree -> Tx_rollup_message_hash_repr.t -> tree - val compute_path : Tx_rollup_message_repr.hash list -> int -> path tzresult + val compute_path : Tx_rollup_message_hash_repr.t list -> int -> path tzresult val check_path : - path -> int -> Tx_rollup_message_repr.hash -> root -> bool tzresult + path -> int -> Tx_rollup_message_hash_repr.t -> root -> bool tzresult val path_depth : path -> int (** [merklize_list messages] construct a merkle root by build a tree, appending the [messages] one by one in the same order of the list and finally computing the root. *) - val merklize_list : Tx_rollup_message_repr.hash list -> root + val merklize_list : Tx_rollup_message_hash_repr.t list -> root end (** The view of an inbox: stores the [cumulated_size] in bytes for the 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 bf978cbd4c95..c4f83d297066 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_inbox_storage.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_inbox_storage.ml @@ -174,7 +174,8 @@ let append_message : >= Constants_storage.tx_rollup_max_messages_per_inbox ctxt) (Inbox_count_would_exceed_limit rollup) >>=? fun () -> - Tx_rollup_message_builder.hash ctxt message >>?= fun (ctxt, message_hash) -> + Tx_rollup_hash_builder.message ctxt message >>?= fun (ctxt, message_hash) -> + Tx_rollup_gas.consume_add_message_cost ctxt >>?= fun ctxt -> let (ctxt, inbox_merkle_root) = Raw_context.Tx_rollup.add_message ctxt rollup message_hash in @@ -218,7 +219,8 @@ let check_message_hash : Raw_context.t tzresult Lwt.t = fun ctxt level tx_rollup ~position message path -> Storage.Tx_rollup.Inbox.get (ctxt, tx_rollup) level >>=? fun (ctxt, inbox) -> - let message_hash = Tx_rollup_message_repr.hash_uncarbonated message in + Tx_rollup_hash_builder.message ctxt message >>?= fun (ctxt, message_hash) -> + Tx_rollup_gas.consume_check_path_inbox_cost ctxt >>?= fun ctxt -> Tx_rollup_inbox_repr.Merkle.check_path path position diff --git a/src/proto_alpha/lib_protocol/tx_rollup_l2_verifier.ml b/src/proto_alpha/lib_protocol/tx_rollup_l2_verifier.ml index 9983814b442a..ffa33d8249ae 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_l2_verifier.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_l2_verifier.ml @@ -25,6 +25,7 @@ (*****************************************************************************) open Tx_rollup_errors_repr +open Alpha_context module Verifier_storage : Tx_rollup_l2_storage_sig.STORAGE @@ -60,17 +61,17 @@ end module Verifier_context = Tx_rollup_l2_context.Make (Verifier_storage) module Verifier_apply = Tx_rollup_l2_apply.Make (Verifier_context) -let hash_message_result after withdraw = - Alpha_context.Tx_rollup_message_result_hash.hash +let hash_message_result ctxt after withdraw = + Tx_rollup_hash.message_result + ctxt {context_hash = after; withdraw_list_hash = withdraw} (** [after_hash_when_proof_failed before] produces the {!Alpha_context.Tx_rollup_message_result_hash} expected if a proof failed. That is, the after hash is the same as [before] and it produced zero withdrawals. *) -let after_hash_when_proof_failed before = - let open Alpha_context in - hash_message_result before Tx_rollup_withdraw_list_hash.empty +let after_hash_when_proof_failed ctxt before = + hash_message_result ctxt before Tx_rollup_withdraw_list_hash.empty (** [compute_proof_after_hash ~max_proof_size agreed proof message] computes the after hash expected while verifying [proof] on [message] starting from @@ -78,7 +79,8 @@ let after_hash_when_proof_failed before = Note that if the proof is incorrect this function fails and the commit can not be rejected. *) -let compute_proof_after_hash ~max_proof_size parameters agreed proof message = +let compute_proof_after_hash ~max_proof_size ctxt parameters agreed proof + message = let proof_length = Data_encoding.Binary.length Tx_rollup_l2_proof.encoding proof in @@ -108,29 +110,28 @@ let compute_proof_after_hash ~max_proof_size parameters agreed proof message = "we were not able to apply this message, so after is the same as before" *) - return (after_hash_when_proof_failed agreed) + after_hash_when_proof_failed ctxt agreed >>?= fun res -> return res | Ok (tree, withdrawals) -> (* The proof is small enough, we compare the computed hash with the committed one *) let tree_hash = Context.Tree.hash tree in - return - (hash_message_result - tree_hash - (Alpha_context.Tx_rollup_withdraw_list_hash.hash withdrawals)) + Tx_rollup_hash.withdraw_list ctxt withdrawals + >>?= fun (ctxt, withdrawals) -> + hash_message_result ctxt tree_hash withdrawals >>?= fun res -> return res | Error _ -> (* Finally, the proof verification leads to an internal Irmin error *) fail Proof_failed_to_reject -let verify_proof parameters message proof - ~(agreed : Alpha_context.Tx_rollup_message_result.t) ~rejected - ~max_proof_size = +let verify_proof ctxt parameters message proof + ~(agreed : Tx_rollup_message_result.t) ~rejected ~max_proof_size = compute_proof_after_hash + ctxt parameters agreed.context_hash ~max_proof_size proof message - >>=? fun computed_result -> + >>=? fun (ctxt, computed_result) -> if Alpha_context.Tx_rollup_message_result_hash.(computed_result <> rejected) - then return_unit + then return ctxt else fail Proof_produced_rejected_state diff --git a/src/proto_alpha/lib_protocol/tx_rollup_l2_verifier.mli b/src/proto_alpha/lib_protocol/tx_rollup_l2_verifier.mli index 1fa9c3f2f91a..9742ce00efdb 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_l2_verifier.mli +++ b/src/proto_alpha/lib_protocol/tx_rollup_l2_verifier.mli @@ -37,19 +37,21 @@ module Verifier_context : sig include Tx_rollup_l2_context_sig.CONTEXT with type t = Verifier_storage.t end -(** [verify_proof message proof ~agreed ~rejected ~max_proof_size] verifies +(** [verify_proof ctxt message proof ~agreed ~rejected ~max_proof_size] verifies a Merkle proof for a L2 message, starting from the state [agreed]. If the [proof] is correct, and the final Merkle hash is not equal to [rejected], then [verify_proof] passes. + Note that if the proof is larger than [max_proof_size] and the final Merkle hash is equal to [rejected], the needed proof for the rejected commitment is too large, thus, [verify_proof] passes and the commitment is rejected. *) val verify_proof : + Alpha_context.t -> Tx_rollup_l2_apply.parameters -> Tx_rollup_message.t -> Tx_rollup_l2_proof.t -> agreed:Tx_rollup_message_result.t -> rejected:Tx_rollup_message_result_hash.t -> max_proof_size:int -> - unit tzresult Lwt.t + Alpha_context.t tzresult Lwt.t diff --git a/src/proto_alpha/lib_protocol/tx_rollup_message_builder.mli b/src/proto_alpha/lib_protocol/tx_rollup_message_hash_repr.ml similarity index 75% rename from src/proto_alpha/lib_protocol/tx_rollup_message_builder.mli rename to src/proto_alpha/lib_protocol/tx_rollup_message_hash_repr.ml index d9d50151947f..6470536935a7 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_message_builder.mli +++ b/src/proto_alpha/lib_protocol/tx_rollup_message_hash_repr.ml @@ -1,9 +1,7 @@ (*****************************************************************************) (* *) (* 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"),*) @@ -25,8 +23,27 @@ (* *) (*****************************************************************************) -(** [hash ctxt msg] computes the hash of [msg] to be stored in the inbox. *) -val hash : - Raw_context.t -> - Tx_rollup_message_repr.t -> - (Raw_context.t * Tx_rollup_message_repr.hash) tzresult +let hash_size = Tx_rollup_prefixes.message_hash.hash_size + +module Message_hash = + Blake2B.Make + (Base58) + (struct + let name = "Tx_rollup_inbox_message_hash" + + let title = "The hash of a transaction rollup inbox’s message" + + let b58check_prefix = Tx_rollup_prefixes.message_hash.b58check_prefix + + let size = Some hash_size + end) + +let () = + Tx_rollup_prefixes.( + check_encoding message_hash Message_hash.b58check_encoding) + +include Message_hash + +let hash_uncarbonated msg = + Message_hash.hash_bytes + [Data_encoding.Binary.to_bytes_exn Tx_rollup_message_repr.encoding msg] diff --git a/src/proto_alpha/lib_protocol/tx_rollup_message_builder.ml b/src/proto_alpha/lib_protocol/tx_rollup_message_hash_repr.mli similarity index 77% rename from src/proto_alpha/lib_protocol/tx_rollup_message_builder.ml rename to src/proto_alpha/lib_protocol/tx_rollup_message_hash_repr.mli index fd47f551b93a..1a69f74c1d5f 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_message_builder.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_message_hash_repr.mli @@ -3,7 +3,7 @@ (* Open Source License *) (* Copyright (c) 2022 Marigold *) (* Copyright (c) 2022 Nomadic Labs *) -(* Copyright (c) 2022 Oxhead Alpha *) +(* 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"),*) @@ -25,12 +25,16 @@ (* *) (*****************************************************************************) -let hash : - Raw_context.t -> - Tx_rollup_message_repr.t -> - (Raw_context.t * Tx_rollup_message_repr.hash) tzresult = - fun ctxt msg -> - Tx_rollup_gas.message_hash_cost @@ Tx_rollup_message_repr.size msg - >>? fun cost -> - Raw_context.consume_gas ctxt cost >>? fun ctxt -> - ok (ctxt, Tx_rollup_message_repr.hash_uncarbonated msg) +(** The Blake2B hash of a message. + + To avoid unnecessary storage duplication, the inboxes in the + layer-1 do not contain the messages, but their hashes (see + {!Tx_rollup_inbox_storage.append_message}). This is possible + because the content of the messages can be reconstructed off-chain + by looking at the layer-1 operations and their receipt. *) + +include S.HASH + +(** [hash_uncarbonated msg] computes the hash of the given message + without any gas consumption. *) +val hash_uncarbonated : Tx_rollup_message_repr.t -> t diff --git a/src/proto_alpha/lib_protocol/tx_rollup_message_repr.ml b/src/proto_alpha/lib_protocol/tx_rollup_message_repr.ml index bb0a7d57f0ec..c1a50a995be8 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_message_repr.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_message_repr.ml @@ -116,33 +116,3 @@ let size = function (* [int64] *) let amount_size = 8 in sender_size + destination_size + key_hash_size + amount_size - -let hash_size = Tx_rollup_prefixes.message_hash.hash_size - -module Message_hash = - Blake2B.Make - (Base58) - (struct - let name = "Tx_rollup_inbox_message_hash" - - let title = "The hash of a transaction rollup inbox’s message" - - let b58check_prefix = Tx_rollup_prefixes.message_hash.b58check_prefix - - let size = Some hash_size - end) - -let () = - Tx_rollup_prefixes.( - check_encoding message_hash Message_hash.b58check_encoding) - -type hash = Message_hash.t - -let pp_hash = Message_hash.pp - -let hash_encoding = Message_hash.encoding - -let hash_uncarbonated msg = - Message_hash.hash_bytes [Data_encoding.Binary.to_bytes_exn encoding msg] - -let hash_equal = Message_hash.equal diff --git a/src/proto_alpha/lib_protocol/tx_rollup_message_repr.mli b/src/proto_alpha/lib_protocol/tx_rollup_message_repr.mli index 289b3c5dff1d..aeed7d50603d 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_message_repr.mli +++ b/src/proto_alpha/lib_protocol/tx_rollup_message_repr.mli @@ -64,21 +64,3 @@ val deposit_encoding : deposit Data_encoding.t val encoding : t Data_encoding.t val pp : Format.formatter -> t -> unit - -(** The Blake2B hash of a message. - - To avoid unnecessary storage duplication, the inboxes in the - layer-1 do not contain the messages, but their hashes (see - {!Tx_rollup_inbox_storage.append_message}). This is possible - because the content of the messages can be reconstructed off-chain - by looking at the layer-1 operations and their receipt. *) -type hash - -val hash_encoding : hash Data_encoding.t - -val pp_hash : Format.formatter -> hash -> unit - -(** [hash_uncarbonated msg] computes the hash of [msg] without gas consumption. *) -val hash_uncarbonated : t -> hash - -val hash_equal : hash -> hash -> bool diff --git a/src/proto_alpha/lib_protocol/tx_rollup_message_result_hash_repr.ml b/src/proto_alpha/lib_protocol/tx_rollup_message_result_hash_repr.ml index 45182e039e00..d956fdcb4320 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_message_result_hash_repr.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_message_result_hash_repr.ml @@ -46,7 +46,7 @@ include Path_encoding.Make_hex (H) let () = Tx_rollup_prefixes.(check_encoding message_result_hash b58check_encoding) -let hash result = +let hash_uncarbonated result = let bytes = Data_encoding.Binary.to_bytes_exn Tx_rollup_message_result_repr.encoding @@ -54,4 +54,4 @@ let hash result = in H.hash_bytes [bytes] -let init = hash Tx_rollup_message_result_repr.init +let init = hash_uncarbonated Tx_rollup_message_result_repr.init diff --git a/src/proto_alpha/lib_protocol/tx_rollup_message_result_hash_repr.mli b/src/proto_alpha/lib_protocol/tx_rollup_message_result_hash_repr.mli index 51d9052e6348..8409c3ed7ca6 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_message_result_hash_repr.mli +++ b/src/proto_alpha/lib_protocol/tx_rollup_message_result_hash_repr.mli @@ -32,8 +32,8 @@ include S.HASH -(** [hash result] computes the hash of the given context hash and - withdraw list hash. *) -val hash : Tx_rollup_message_result_repr.t -> t +(** [hash_uncarbonated result] computes the hash of the given context + hash and withdraw list hash without any gas consumption. *) +val hash_uncarbonated : Tx_rollup_message_result_repr.t -> t val init : t diff --git a/src/proto_alpha/lib_protocol/tx_rollup_withdraw_list_hash_repr.ml b/src/proto_alpha/lib_protocol/tx_rollup_withdraw_list_hash_repr.ml index 1ea5b10c9ebc..3e455f33080b 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_withdraw_list_hash_repr.ml +++ b/src/proto_alpha/lib_protocol/tx_rollup_withdraw_list_hash_repr.ml @@ -44,11 +44,11 @@ include Path_encoding.Make_hex (H) let () = Tx_rollup_prefixes.(check_encoding withdraw_list_hash b58check_encoding) -let hash l = +let hash_uncarbonated l = let bytes = Data_encoding.( Binary.to_bytes_exn (list Tx_rollup_withdraw_repr.encoding) l) in H.hash_bytes [bytes] -let empty = hash [] +let empty = hash_uncarbonated [] diff --git a/src/proto_alpha/lib_protocol/tx_rollup_withdraw_list_hash_repr.mli b/src/proto_alpha/lib_protocol/tx_rollup_withdraw_list_hash_repr.mli index ec6c36ed5645..9126cd94d7fd 100644 --- a/src/proto_alpha/lib_protocol/tx_rollup_withdraw_list_hash_repr.mli +++ b/src/proto_alpha/lib_protocol/tx_rollup_withdraw_list_hash_repr.mli @@ -25,6 +25,6 @@ include S.HASH -val hash : Tx_rollup_withdraw_repr.t list -> t +val hash_uncarbonated : Tx_rollup_withdraw_repr.t list -> t val empty : t diff --git a/tezt/_regressions/tx_rollup_batch_encoding.out b/tezt/_regressions/tx_rollup_batch_encoding.out index 3ac824c7b385..b45b1758bd6a 100644 --- a/tezt/_regressions/tx_rollup_batch_encoding.out +++ b/tezt/_regressions/tx_rollup_batch_encoding.out @@ -2,7 +2,7 @@ tx_rollup_batch_encoding.out ./tezos-client --wait none originate tx rollup from '[PUBLIC_KEY_HASH]' --burn-cap 9999999 --storage-limit 60000 Node is bootstrapped. -Estimated gas: 1410.108 units (will add 100 for safety) +Estimated gas: 1410.112 units (will add 100 for safety) Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' NOT waiting for the operation to be included. @@ -25,13 +25,13 @@ This sequence of operations was run: Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ15 storage fees ........................... +ꜩ15 - Consumed gas: 1410.108 + Consumed gas: 1410.112 Originated tx rollup: [TX_ROLLUP_HASH] ./tezos-client --wait none submit tx rollup batch 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' Node is bootstrapped. -Estimated gas: 2021.958 units (will add 100 for safety) +Estimated gas: 2689.447 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -42,17 +42,17 @@ 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.000718 + Fee to the baker: ꜩ0.000784 Expected counter: 2 - Gas limit: 2122 + Gas limit: 2790 Storage limit: 0 bytes Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.000718 - payload fees(the block proposer) ....... +ꜩ0.000718 + [PUBLIC_KEY_HASH] ... -ꜩ0.000784 + payload fees(the block proposer) ....... +ꜩ0.000784 Tx rollup transaction:[TX_ROLLUP_HASH], 256 bytes, From: [PUBLIC_KEY_HASH] This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2021.958 + Consumed gas: 2689.447 "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff" diff --git a/tezt/_regressions/tx_rollup_finalize_commitment_future.out b/tezt/_regressions/tx_rollup_finalize_commitment_future.out index 9f933e9345c8..361c0820f40a 100644 --- a/tezt/_regressions/tx_rollup_finalize_commitment_future.out +++ b/tezt/_regressions/tx_rollup_finalize_commitment_future.out @@ -2,7 +2,7 @@ tx_rollup_finalize_commitment_future.out ./tezos-client --wait none originate tx rollup from '[PUBLIC_KEY_HASH]' --burn-cap 9999999 --storage-limit 60000 Node is bootstrapped. -Estimated gas: 1410.108 units (will add 100 for safety) +Estimated gas: 1410.112 units (will add 100 for safety) Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' NOT waiting for the operation to be included. @@ -25,13 +25,13 @@ This sequence of operations was run: Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ15 storage fees ........................... +ꜩ15 - Consumed gas: 1410.108 + Consumed gas: 1410.112 Originated tx rollup: [TX_ROLLUP_HASH] ./tezos-client --wait none submit tx rollup batch 626c6f62 to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' Node is bootstrapped. -Estimated gas: 2021.390 units (will add 100 for safety) +Estimated gas: 2564.880 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -42,18 +42,18 @@ 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.000466 + Fee to the baker: ꜩ0.00052 Expected counter: 2 - Gas limit: 2122 + Gas limit: 2665 Storage limit: 0 bytes Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.000466 - payload fees(the block proposer) ....... +ꜩ0.000466 + [PUBLIC_KEY_HASH] ... -ꜩ0.00052 + payload fees(the block proposer) ....... +ꜩ0.00052 Tx rollup transaction:[TX_ROLLUP_HASH], 4 bytes, From: [PUBLIC_KEY_HASH] This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2021.390 + Consumed gas: 2564.880 ./tezos-client --wait none submit tx rollup finalize commitment to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' diff --git a/tezt/_regressions/tx_rollup_finalize_commitment_no_batch.out b/tezt/_regressions/tx_rollup_finalize_commitment_no_batch.out index 794a0648464a..8791e629dfa9 100644 --- a/tezt/_regressions/tx_rollup_finalize_commitment_no_batch.out +++ b/tezt/_regressions/tx_rollup_finalize_commitment_no_batch.out @@ -2,7 +2,7 @@ tx_rollup_finalize_commitment_no_batch.out ./tezos-client --wait none originate tx rollup from '[PUBLIC_KEY_HASH]' --burn-cap 9999999 --storage-limit 60000 Node is bootstrapped. -Estimated gas: 1410.108 units (will add 100 for safety) +Estimated gas: 1410.112 units (will add 100 for safety) Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' NOT waiting for the operation to be included. @@ -25,7 +25,7 @@ This sequence of operations was run: Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ15 storage fees ........................... +ꜩ15 - Consumed gas: 1410.108 + Consumed gas: 1410.112 Originated tx rollup: [TX_ROLLUP_HASH] diff --git a/tezt/_regressions/tx_rollup_finalize_commitment_no_commitment.out b/tezt/_regressions/tx_rollup_finalize_commitment_no_commitment.out index af086f0a7f8a..005aa87ac105 100644 --- a/tezt/_regressions/tx_rollup_finalize_commitment_no_commitment.out +++ b/tezt/_regressions/tx_rollup_finalize_commitment_no_commitment.out @@ -2,7 +2,7 @@ tx_rollup_finalize_commitment_no_commitment.out ./tezos-client --wait none originate tx rollup from '[PUBLIC_KEY_HASH]' --burn-cap 9999999 --storage-limit 60000 Node is bootstrapped. -Estimated gas: 1410.108 units (will add 100 for safety) +Estimated gas: 1410.112 units (will add 100 for safety) Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' NOT waiting for the operation to be included. @@ -25,13 +25,13 @@ This sequence of operations was run: Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ15 storage fees ........................... +ꜩ15 - Consumed gas: 1410.108 + Consumed gas: 1410.112 Originated tx rollup: [TX_ROLLUP_HASH] ./tezos-client --wait none submit tx rollup batch 626c6f62 to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' Node is bootstrapped. -Estimated gas: 2021.390 units (will add 100 for safety) +Estimated gas: 2564.880 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -42,18 +42,18 @@ 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.000466 + Fee to the baker: ꜩ0.00052 Expected counter: 2 - Gas limit: 2122 + Gas limit: 2665 Storage limit: 0 bytes Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.000466 - payload fees(the block proposer) ....... +ꜩ0.000466 + [PUBLIC_KEY_HASH] ... -ꜩ0.00052 + payload fees(the block proposer) ....... +ꜩ0.00052 Tx rollup transaction:[TX_ROLLUP_HASH], 4 bytes, From: [PUBLIC_KEY_HASH] This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2021.390 + Consumed gas: 2564.880 ./tezos-client --wait none submit tx rollup finalize commitment to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' diff --git a/tezt/_regressions/tx_rollup_finalize_too_recent_commitment.out b/tezt/_regressions/tx_rollup_finalize_too_recent_commitment.out index f5beadb6af80..e6a15bf12303 100644 --- a/tezt/_regressions/tx_rollup_finalize_too_recent_commitment.out +++ b/tezt/_regressions/tx_rollup_finalize_too_recent_commitment.out @@ -2,7 +2,7 @@ tx_rollup_finalize_too_recent_commitment.out ./tezos-client --wait none originate tx rollup from '[PUBLIC_KEY_HASH]' --burn-cap 9999999 --storage-limit 60000 Node is bootstrapped. -Estimated gas: 1410.108 units (will add 100 for safety) +Estimated gas: 1410.112 units (will add 100 for safety) Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' NOT waiting for the operation to be included. @@ -25,13 +25,13 @@ This sequence of operations was run: Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ15 storage fees ........................... +ꜩ15 - Consumed gas: 1410.108 + Consumed gas: 1410.112 Originated tx rollup: [TX_ROLLUP_HASH] ./tezos-client --wait none submit tx rollup batch 626c6f62 to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' Node is bootstrapped. -Estimated gas: 2021.390 units (will add 100 for safety) +Estimated gas: 2564.880 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -42,23 +42,23 @@ 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.000466 + Fee to the baker: ꜩ0.00052 Expected counter: 2 - Gas limit: 2122 + Gas limit: 2665 Storage limit: 0 bytes Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.000466 - payload fees(the block proposer) ....... +ꜩ0.000466 + [PUBLIC_KEY_HASH] ... -ꜩ0.00052 + payload fees(the block proposer) ....... +ꜩ0.00052 Tx rollup transaction:[TX_ROLLUP_HASH], 4 bytes, From: [PUBLIC_KEY_HASH] This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2021.390 + Consumed gas: 2564.880 ./tezos-client --wait none submit tx rollup commitment 0 '[TX_ROLLUP_INBOX_HASH]' '[TX_ROLLUP_MESSAGE_RESULT_HASH]' to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' Node is bootstrapped. -Estimated gas: 3471.272 units (will add 100 for safety) +Estimated gas: 3453.146 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -69,20 +69,20 @@ 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.000675 + Fee to the baker: ꜩ0.000673 Expected counter: 3 - Gas limit: 3572 + Gas limit: 3554 Storage limit: 0 bytes Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.000675 - payload fees(the block proposer) ....... +ꜩ0.000675 + [PUBLIC_KEY_HASH] ... -ꜩ0.000673 + payload fees(the block proposer) ....... +ꜩ0.000673 Tx rollup commitment:[TX_ROLLUP_HASH], commitment 0 : messages = [TX_ROLLUP_MESSAGE_RESULT_HASH] predecessor for inbox with merkle root [TX_ROLLUP_INBOX_HASH] From: [PUBLIC_KEY_HASH] This tx rollup commit operation was successfully applied Balance updates: [PUBLIC_KEY_HASH] ....................................................... -ꜩ10000 Frozen_bonds([PUBLIC_KEY_HASH],[TX_ROLLUP_HASH]) ... +ꜩ10000 - Consumed gas: 3471.272 + Consumed gas: 3453.146 ./tezos-client --wait none submit tx rollup finalize commitment to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' diff --git a/tezt/_regressions/tx_rollup_limit_empty_batch.out b/tezt/_regressions/tx_rollup_limit_empty_batch.out index 6411d0c0a842..a4960678140d 100644 --- a/tezt/_regressions/tx_rollup_limit_empty_batch.out +++ b/tezt/_regressions/tx_rollup_limit_empty_batch.out @@ -2,7 +2,7 @@ tx_rollup_limit_empty_batch.out ./tezos-client --wait none originate tx rollup from '[PUBLIC_KEY_HASH]' --burn-cap 9999999 --storage-limit 60000 Node is bootstrapped. -Estimated gas: 1410.108 units (will add 100 for safety) +Estimated gas: 1410.112 units (will add 100 for safety) Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' NOT waiting for the operation to be included. @@ -25,13 +25,13 @@ This sequence of operations was run: Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ15 storage fees ........................... +ꜩ15 - Consumed gas: 1410.108 + Consumed gas: 1410.112 Originated tx rollup: [TX_ROLLUP_HASH] ./tezos-client --wait none submit tx rollup batch to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' Node is bootstrapped. -Estimated gas: 2021.382 units (will add 100 for safety) +Estimated gas: 2560.871 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -42,16 +42,16 @@ 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.000462 + Fee to the baker: ꜩ0.000516 Expected counter: 2 - Gas limit: 2122 + Gas limit: 2661 Storage limit: 0 bytes Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.000462 - payload fees(the block proposer) ....... +ꜩ0.000462 + [PUBLIC_KEY_HASH] ... -ꜩ0.000516 + payload fees(the block proposer) ....... +ꜩ0.000516 Tx rollup transaction:[TX_ROLLUP_HASH], 0 bytes, From: [PUBLIC_KEY_HASH] This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2021.382 + Consumed gas: 2560.871 diff --git a/tezt/_regressions/tx_rollup_limit_maximum_size_batch.out b/tezt/_regressions/tx_rollup_limit_maximum_size_batch.out index 5460dbe04f23..2f8863bac18d 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 @@ tx_rollup_limit_maximum_size_batch.out ./tezos-client --wait none originate tx rollup from '[PUBLIC_KEY_HASH]' --burn-cap 9999999 --storage-limit 60000 Node is bootstrapped. -Estimated gas: 1410.108 units (will add 100 for safety) +Estimated gas: 1410.112 units (will add 100 for safety) Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' NOT waiting for the operation to be included. @@ -25,13 +25,13 @@ This sequence of operations was run: Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ15 storage fees ........................... +ꜩ15 - Consumed gas: 1410.108 + Consumed gas: 1410.112 Originated tx rollup: [TX_ROLLUP_HASH] ./tezos-client --wait none submit tx rollup batch 6262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262 to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' Node is bootstrapped. -Estimated gas: 2032.632 units (will add 100 for safety) +Estimated gas: 5072.121 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -42,18 +42,18 @@ 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.005463 + Fee to the baker: ꜩ0.005767 Expected counter: 2 - Gas limit: 2133 + Gas limit: 5173 Storage limit: 0 bytes Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.005463 - payload fees(the block proposer) ....... +ꜩ0.005463 + [PUBLIC_KEY_HASH] ... -ꜩ0.005767 + payload fees(the block proposer) ....... +ꜩ0.005767 Tx rollup transaction:[TX_ROLLUP_HASH], 5000 bytes, From: [PUBLIC_KEY_HASH] This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2032.632 + Consumed gas: 5072.121 ./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 b1029ea52317..49bb49ca736d 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 @@ tx_rollup_limit_maximum_size_inbox.out ./tezos-client --wait none originate tx rollup from '[PUBLIC_KEY_HASH]' --burn-cap 9999999 --storage-limit 60000 Node is bootstrapped. -Estimated gas: 1410.108 units (will add 100 for safety) +Estimated gas: 1410.112 units (will add 100 for safety) Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' NOT waiting for the operation to be included. @@ -25,13 +25,13 @@ This sequence of operations was run: Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ15 storage fees ........................... +ꜩ15 - Consumed gas: 1410.108 + Consumed gas: 1410.112 Originated tx rollup: [TX_ROLLUP_HASH] ./tezos-client --wait none submit tx rollup batch 6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161 to '[TX_ROLLUP_HASH]' from bootstrap1 Node is bootstrapped. -Estimated gas: 2032.632 units (will add 100 for safety) +Estimated gas: 5072.121 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -42,23 +42,23 @@ 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.005463 + Fee to the baker: ꜩ0.005767 Expected counter: 2 - Gas limit: 2133 + Gas limit: 5173 Storage limit: 0 bytes Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.005463 - payload fees(the block proposer) ....... +ꜩ0.005463 + [PUBLIC_KEY_HASH] ... -ꜩ0.005767 + payload fees(the block proposer) ....... +ꜩ0.005767 Tx rollup transaction:[TX_ROLLUP_HASH], 5000 bytes, From: [PUBLIC_KEY_HASH] This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2032.632 + Consumed gas: 5072.121 ./tezos-client --wait none submit tx rollup batch 6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161 to '[TX_ROLLUP_HASH]' from bootstrap2 Node is bootstrapped. -Estimated gas: 2032.632 units (will add 100 for safety) +Estimated gas: 5072.121 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -69,23 +69,23 @@ 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.005463 + Fee to the baker: ꜩ0.005767 Expected counter: 1 - Gas limit: 2133 + Gas limit: 5173 Storage limit: 0 bytes Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.005463 - payload fees(the block proposer) ....... +ꜩ0.005463 + [PUBLIC_KEY_HASH] ... -ꜩ0.005767 + payload fees(the block proposer) ....... +ꜩ0.005767 Tx rollup transaction:[TX_ROLLUP_HASH], 5000 bytes, From: [PUBLIC_KEY_HASH] This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2032.632 + Consumed gas: 5072.121 ./tezos-client --wait none submit tx rollup batch 6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161 to '[TX_ROLLUP_HASH]' from bootstrap3 Node is bootstrapped. -Estimated gas: 2032.632 units (will add 100 for safety) +Estimated gas: 5072.121 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -96,23 +96,23 @@ 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.005463 + Fee to the baker: ꜩ0.005767 Expected counter: 1 - Gas limit: 2133 + Gas limit: 5173 Storage limit: 0 bytes Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.005463 - payload fees(the block proposer) ....... +ꜩ0.005463 + [PUBLIC_KEY_HASH] ... -ꜩ0.005767 + payload fees(the block proposer) ....... +ꜩ0.005767 Tx rollup transaction:[TX_ROLLUP_HASH], 5000 bytes, From: [PUBLIC_KEY_HASH] This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2032.632 + Consumed gas: 5072.121 ./tezos-client --wait none submit tx rollup batch 6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161 to '[TX_ROLLUP_HASH]' from bootstrap4 Node is bootstrapped. -Estimated gas: 2032.632 units (will add 100 for safety) +Estimated gas: 5072.121 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -123,23 +123,23 @@ 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.005463 + Fee to the baker: ꜩ0.005767 Expected counter: 1 - Gas limit: 2133 + Gas limit: 5173 Storage limit: 0 bytes Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.005463 - payload fees(the block proposer) ....... +ꜩ0.005463 + [PUBLIC_KEY_HASH] ... -ꜩ0.005767 + payload fees(the block proposer) ....... +ꜩ0.005767 Tx rollup transaction:[TX_ROLLUP_HASH], 5000 bytes, From: [PUBLIC_KEY_HASH] This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2032.632 + Consumed gas: 5072.121 ./tezos-client --wait none submit tx rollup batch 6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161 to '[TX_ROLLUP_HASH]' from bootstrap5 Node is bootstrapped. -Estimated gas: 2032.632 units (will add 100 for safety) +Estimated gas: 5072.121 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -150,24 +150,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.005463 + Fee to the baker: ꜩ0.005767 Expected counter: 1 - Gas limit: 2133 + Gas limit: 5173 Storage limit: 0 bytes Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.005463 - payload fees(the block proposer) ....... +ꜩ0.005463 + [PUBLIC_KEY_HASH] ... -ꜩ0.005767 + payload fees(the block proposer) ....... +ꜩ0.005767 Tx rollup transaction:[TX_ROLLUP_HASH], 5000 bytes, From: [PUBLIC_KEY_HASH] This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2032.632 + Consumed gas: 5072.121 ./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: 2032.632 units (will add 100 for safety) +Estimated gas: 5072.121 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -192,24 +192,24 @@ This sequence of operations was run: Consumed gas: 1000 Manager signed operations: From: [PUBLIC_KEY_HASH] - Fee to the baker: ꜩ0.005367 + Fee to the baker: ꜩ0.005671 Expected counter: 2 - Gas limit: 2133 + Gas limit: 5173 Storage limit: 0 bytes Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.005367 - payload fees(the block proposer) ....... +ꜩ0.005367 + [PUBLIC_KEY_HASH] ... -ꜩ0.005671 + payload fees(the block proposer) ....... +ꜩ0.005671 Tx rollup transaction:[TX_ROLLUP_HASH], 5000 bytes, From: [PUBLIC_KEY_HASH] This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2032.632 + Consumed gas: 5072.121 ./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: 2032.632 units (will add 100 for safety) +Estimated gas: 5072.121 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -234,24 +234,24 @@ This sequence of operations was run: Consumed gas: 1000 Manager signed operations: From: [PUBLIC_KEY_HASH] - Fee to the baker: ꜩ0.005367 + Fee to the baker: ꜩ0.005671 Expected counter: 2 - Gas limit: 2133 + Gas limit: 5173 Storage limit: 0 bytes Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.005367 - payload fees(the block proposer) ....... +ꜩ0.005367 + [PUBLIC_KEY_HASH] ... -ꜩ0.005671 + payload fees(the block proposer) ....... +ꜩ0.005671 Tx rollup transaction:[TX_ROLLUP_HASH], 5000 bytes, From: [PUBLIC_KEY_HASH] This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2032.632 + Consumed gas: 5072.121 ./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: 2032.632 units (will add 100 for safety) +Estimated gas: 5072.121 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -276,24 +276,24 @@ This sequence of operations was run: Consumed gas: 1000 Manager signed operations: From: [PUBLIC_KEY_HASH] - Fee to the baker: ꜩ0.005367 + Fee to the baker: ꜩ0.005671 Expected counter: 2 - Gas limit: 2133 + Gas limit: 5173 Storage limit: 0 bytes Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.005367 - payload fees(the block proposer) ....... +ꜩ0.005367 + [PUBLIC_KEY_HASH] ... -ꜩ0.005671 + payload fees(the block proposer) ....... +ꜩ0.005671 Tx rollup transaction:[TX_ROLLUP_HASH], 5000 bytes, From: [PUBLIC_KEY_HASH] This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2032.632 + Consumed gas: 5072.121 ./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: 2032.632 units (will add 100 for safety) +Estimated gas: 5072.121 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -318,24 +318,24 @@ This sequence of operations was run: Consumed gas: 1000 Manager signed operations: From: [PUBLIC_KEY_HASH] - Fee to the baker: ꜩ0.005367 + Fee to the baker: ꜩ0.005671 Expected counter: 2 - Gas limit: 2133 + Gas limit: 5173 Storage limit: 0 bytes Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.005367 - payload fees(the block proposer) ....... +ꜩ0.005367 + [PUBLIC_KEY_HASH] ... -ꜩ0.005671 + payload fees(the block proposer) ....... +ꜩ0.005671 Tx rollup transaction:[TX_ROLLUP_HASH], 5000 bytes, From: [PUBLIC_KEY_HASH] This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2032.632 + Consumed gas: 5072.121 ./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: 2032.632 units (will add 100 for safety) +Estimated gas: 5072.121 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -360,24 +360,24 @@ This sequence of operations was run: Consumed gas: 1000 Manager signed operations: From: [PUBLIC_KEY_HASH] - Fee to the baker: ꜩ0.005367 + Fee to the baker: ꜩ0.005671 Expected counter: 2 - Gas limit: 2133 + Gas limit: 5173 Storage limit: 0 bytes Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.005367 - payload fees(the block proposer) ....... +ꜩ0.005367 + [PUBLIC_KEY_HASH] ... -ꜩ0.005671 + payload fees(the block proposer) ....... +ꜩ0.005671 Tx rollup transaction:[TX_ROLLUP_HASH], 5000 bytes, From: [PUBLIC_KEY_HASH] This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2032.632 + Consumed gas: 5072.121 ./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: 2032.632 units (will add 100 for safety) +Estimated gas: 5072.121 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -402,24 +402,24 @@ This sequence of operations was run: Consumed gas: 1000 Manager signed operations: From: [PUBLIC_KEY_HASH] - Fee to the baker: ꜩ0.005367 + Fee to the baker: ꜩ0.005671 Expected counter: 2 - Gas limit: 2133 + Gas limit: 5173 Storage limit: 0 bytes Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.005367 - payload fees(the block proposer) ....... +ꜩ0.005367 + [PUBLIC_KEY_HASH] ... -ꜩ0.005671 + payload fees(the block proposer) ....... +ꜩ0.005671 Tx rollup transaction:[TX_ROLLUP_HASH], 5000 bytes, From: [PUBLIC_KEY_HASH] This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2032.632 + Consumed gas: 5072.121 ./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: 2032.632 units (will add 100 for safety) +Estimated gas: 5072.121 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -444,24 +444,24 @@ This sequence of operations was run: Consumed gas: 1000 Manager signed operations: From: [PUBLIC_KEY_HASH] - Fee to the baker: ꜩ0.005367 + Fee to the baker: ꜩ0.005671 Expected counter: 2 - Gas limit: 2133 + Gas limit: 5173 Storage limit: 0 bytes Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.005367 - payload fees(the block proposer) ....... +ꜩ0.005367 + [PUBLIC_KEY_HASH] ... -ꜩ0.005671 + payload fees(the block proposer) ....... +ꜩ0.005671 Tx rollup transaction:[TX_ROLLUP_HASH], 5000 bytes, From: [PUBLIC_KEY_HASH] This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2032.632 + Consumed gas: 5072.121 ./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: 2032.632 units (will add 100 for safety) +Estimated gas: 5072.121 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -486,24 +486,24 @@ This sequence of operations was run: Consumed gas: 1000 Manager signed operations: From: [PUBLIC_KEY_HASH] - Fee to the baker: ꜩ0.005367 + Fee to the baker: ꜩ0.005671 Expected counter: 2 - Gas limit: 2133 + Gas limit: 5173 Storage limit: 0 bytes Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.005367 - payload fees(the block proposer) ....... +ꜩ0.005367 + [PUBLIC_KEY_HASH] ... -ꜩ0.005671 + payload fees(the block proposer) ....... +ꜩ0.005671 Tx rollup transaction:[TX_ROLLUP_HASH], 5000 bytes, From: [PUBLIC_KEY_HASH] This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2032.632 + Consumed gas: 5072.121 ./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: 2032.632 units (will add 100 for safety) +Estimated gas: 5072.121 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -528,24 +528,24 @@ This sequence of operations was run: Consumed gas: 1000 Manager signed operations: From: [PUBLIC_KEY_HASH] - Fee to the baker: ꜩ0.005367 + Fee to the baker: ꜩ0.005671 Expected counter: 2 - Gas limit: 2133 + Gas limit: 5173 Storage limit: 0 bytes Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.005367 - payload fees(the block proposer) ....... +ꜩ0.005367 + [PUBLIC_KEY_HASH] ... -ꜩ0.005671 + payload fees(the block proposer) ....... +ꜩ0.005671 Tx rollup transaction:[TX_ROLLUP_HASH], 5000 bytes, From: [PUBLIC_KEY_HASH] This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2032.632 + Consumed gas: 5072.121 ./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: 2032.632 units (will add 100 for safety) +Estimated gas: 5072.121 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -570,24 +570,24 @@ This sequence of operations was run: Consumed gas: 1000 Manager signed operations: From: [PUBLIC_KEY_HASH] - Fee to the baker: ꜩ0.005367 + Fee to the baker: ꜩ0.005671 Expected counter: 2 - Gas limit: 2133 + Gas limit: 5173 Storage limit: 0 bytes Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.005367 - payload fees(the block proposer) ....... +ꜩ0.005367 + [PUBLIC_KEY_HASH] ... -ꜩ0.005671 + payload fees(the block proposer) ....... +ꜩ0.005671 Tx rollup transaction:[TX_ROLLUP_HASH], 5000 bytes, From: [PUBLIC_KEY_HASH] This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2032.632 + Consumed gas: 5072.121 ./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: 2032.632 units (will add 100 for safety) +Estimated gas: 5072.121 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -612,24 +612,24 @@ This sequence of operations was run: Consumed gas: 1000 Manager signed operations: From: [PUBLIC_KEY_HASH] - Fee to the baker: ꜩ0.005367 + Fee to the baker: ꜩ0.005671 Expected counter: 2 - Gas limit: 2133 + Gas limit: 5173 Storage limit: 0 bytes Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.005367 - payload fees(the block proposer) ....... +ꜩ0.005367 + [PUBLIC_KEY_HASH] ... -ꜩ0.005671 + payload fees(the block proposer) ....... +ꜩ0.005671 Tx rollup transaction:[TX_ROLLUP_HASH], 5000 bytes, From: [PUBLIC_KEY_HASH] This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2032.632 + Consumed gas: 5072.121 ./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: 2032.632 units (will add 100 for safety) +Estimated gas: 5072.121 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -654,24 +654,24 @@ This sequence of operations was run: Consumed gas: 1000 Manager signed operations: From: [PUBLIC_KEY_HASH] - Fee to the baker: ꜩ0.005367 + Fee to the baker: ꜩ0.005671 Expected counter: 2 - Gas limit: 2133 + Gas limit: 5173 Storage limit: 0 bytes Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.005367 - payload fees(the block proposer) ....... +ꜩ0.005367 + [PUBLIC_KEY_HASH] ... -ꜩ0.005671 + payload fees(the block proposer) ....... +ꜩ0.005671 Tx rollup transaction:[TX_ROLLUP_HASH], 5000 bytes, From: [PUBLIC_KEY_HASH] This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2032.632 + Consumed gas: 5072.121 ./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: 2032.632 units (will add 100 for safety) +Estimated gas: 5072.121 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -696,24 +696,24 @@ This sequence of operations was run: Consumed gas: 1000 Manager signed operations: From: [PUBLIC_KEY_HASH] - Fee to the baker: ꜩ0.005367 + Fee to the baker: ꜩ0.005671 Expected counter: 2 - Gas limit: 2133 + Gas limit: 5173 Storage limit: 0 bytes Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.005367 - payload fees(the block proposer) ....... +ꜩ0.005367 + [PUBLIC_KEY_HASH] ... -ꜩ0.005671 + payload fees(the block proposer) ....... +ꜩ0.005671 Tx rollup transaction:[TX_ROLLUP_HASH], 5000 bytes, From: [PUBLIC_KEY_HASH] This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2032.632 + Consumed gas: 5072.121 ./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: 2032.632 units (will add 100 for safety) +Estimated gas: 5072.121 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -738,24 +738,24 @@ This sequence of operations was run: Consumed gas: 1000 Manager signed operations: From: [PUBLIC_KEY_HASH] - Fee to the baker: ꜩ0.005367 + Fee to the baker: ꜩ0.005671 Expected counter: 2 - Gas limit: 2133 + Gas limit: 5173 Storage limit: 0 bytes Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.005367 - payload fees(the block proposer) ....... +ꜩ0.005367 + [PUBLIC_KEY_HASH] ... -ꜩ0.005671 + payload fees(the block proposer) ....... +ꜩ0.005671 Tx rollup transaction:[TX_ROLLUP_HASH], 5000 bytes, From: [PUBLIC_KEY_HASH] This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2032.632 + Consumed gas: 5072.121 ./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: 2032.632 units (will add 100 for safety) +Estimated gas: 5072.121 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -780,21 +780,20 @@ This sequence of operations was run: Consumed gas: 1000 Manager signed operations: From: [PUBLIC_KEY_HASH] - Fee to the baker: ꜩ0.005367 + Fee to the baker: ꜩ0.005671 Expected counter: 2 - Gas limit: 2133 + Gas limit: 5173 Storage limit: 0 bytes Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.005367 - payload fees(the block proposer) ....... +ꜩ0.005367 + [PUBLIC_KEY_HASH] ... -ꜩ0.005671 + payload fees(the block proposer) ....... +ꜩ0.005671 Tx rollup transaction:[TX_ROLLUP_HASH], 5000 bytes, From: [PUBLIC_KEY_HASH] This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2032.632 + Consumed gas: 5072.121 ./tezos-client rpc get '/chains/main/blocks/head/context/tx_rollup/[TX_ROLLUP_HASH]/inbox/0' { "inbox_length": 20, "cumulated_size": 100000, - "merkle_root": "[TX_ROLLUP_INBOX_HASH]", - "orphan": true } + "merkle_root": "[TX_ROLLUP_INBOX_HASH]" } diff --git a/tezt/_regressions/tx_rollup_rpc_commitment.out b/tezt/_regressions/tx_rollup_rpc_commitment.out index dcdc2c6641f0..b5b595dfd37c 100644 --- a/tezt/_regressions/tx_rollup_rpc_commitment.out +++ b/tezt/_regressions/tx_rollup_rpc_commitment.out @@ -2,7 +2,7 @@ tx_rollup_rpc_commitment.out ./tezos-client --wait none originate tx rollup from '[PUBLIC_KEY_HASH]' --burn-cap 9999999 --storage-limit 60000 Node is bootstrapped. -Estimated gas: 1410.108 units (will add 100 for safety) +Estimated gas: 1410.112 units (will add 100 for safety) Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' NOT waiting for the operation to be included. @@ -25,13 +25,13 @@ This sequence of operations was run: Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ15 storage fees ........................... +ꜩ15 - Consumed gas: 1410.108 + Consumed gas: 1410.112 Originated tx rollup: [TX_ROLLUP_HASH] ./tezos-client --wait none submit tx rollup batch 626c6f62 to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' Node is bootstrapped. -Estimated gas: 2021.390 units (will add 100 for safety) +Estimated gas: 2564.880 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -42,23 +42,23 @@ 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.000466 + Fee to the baker: ꜩ0.00052 Expected counter: 2 - Gas limit: 2122 + Gas limit: 2665 Storage limit: 0 bytes Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.000466 - payload fees(the block proposer) ....... +ꜩ0.000466 + [PUBLIC_KEY_HASH] ... -ꜩ0.00052 + payload fees(the block proposer) ....... +ꜩ0.00052 Tx rollup transaction:[TX_ROLLUP_HASH], 4 bytes, From: [PUBLIC_KEY_HASH] This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2021.390 + Consumed gas: 2564.880 ./tezos-client --wait none submit tx rollup commitment 0 '[TX_ROLLUP_INBOX_HASH]' '[TX_ROLLUP_MESSAGE_RESULT_HASH]' to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' Node is bootstrapped. -Estimated gas: 3471.272 units (will add 100 for safety) +Estimated gas: 3453.146 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -69,20 +69,20 @@ 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.000675 + Fee to the baker: ꜩ0.000673 Expected counter: 3 - Gas limit: 3572 + Gas limit: 3554 Storage limit: 0 bytes Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.000675 - payload fees(the block proposer) ....... +ꜩ0.000675 + [PUBLIC_KEY_HASH] ... -ꜩ0.000673 + payload fees(the block proposer) ....... +ꜩ0.000673 Tx rollup commitment:[TX_ROLLUP_HASH], commitment 0 : messages = [TX_ROLLUP_MESSAGE_RESULT_HASH] predecessor for inbox with merkle root [TX_ROLLUP_INBOX_HASH] From: [PUBLIC_KEY_HASH] This tx rollup commit operation was successfully applied Balance updates: [PUBLIC_KEY_HASH] ....................................................... -ꜩ10000 Frozen_bonds([PUBLIC_KEY_HASH],[TX_ROLLUP_HASH]) ... +ꜩ10000 - Consumed gas: 3471.272 + Consumed gas: 3453.146 ./tezos-client rpc get '/chains/main/blocks/head/context/tx_rollup/[TX_ROLLUP_HASH]/commitment/0' @@ -90,7 +90,7 @@ This sequence of operations was run: { "level": 0, "messages": { "count": 1, - "root": "[TX_ROLLUP_MESSAGE_RESULT_HASH]", + "root": "txM36Kjo7cRtSCREhUPJCSnC2CahmR15sif2bW8qTjTq8GHenH89v", "last_message_result_hash": "[TX_ROLLUP_MESSAGE_RESULT_HASH]" }, "predecessor": null, @@ -107,4 +107,4 @@ This sequence of operations was run: "commitment_newest_hash": "[TX_ROLLUP_COMMITMENT_HASH]", "tezos_head_level": 3, "burn_per_byte": "0", "allocated_storage": "60000", - "occupied_storage": "0", "inbox_ema": 0 } + "occupied_storage": "0", "inbox_ema": 0, "commitments_watermark": 0 } diff --git a/tezt/_regressions/tx_rollup_rpc_inbox.out b/tezt/_regressions/tx_rollup_rpc_inbox.out index db2d32fd24d6..e8ab507225e8 100644 --- a/tezt/_regressions/tx_rollup_rpc_inbox.out +++ b/tezt/_regressions/tx_rollup_rpc_inbox.out @@ -2,7 +2,7 @@ tx_rollup_rpc_inbox.out ./tezos-client --wait none originate tx rollup from '[PUBLIC_KEY_HASH]' --burn-cap 9999999 --storage-limit 60000 Node is bootstrapped. -Estimated gas: 1410.108 units (will add 100 for safety) +Estimated gas: 1410.112 units (will add 100 for safety) Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' NOT waiting for the operation to be included. @@ -25,13 +25,13 @@ This sequence of operations was run: Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ15 storage fees ........................... +ꜩ15 - Consumed gas: 1410.108 + Consumed gas: 1410.112 Originated tx rollup: [TX_ROLLUP_HASH] ./tezos-client --wait none submit tx rollup batch 626c6f62 to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' Node is bootstrapped. -Estimated gas: 2021.390 units (will add 100 for safety) +Estimated gas: 2564.880 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -42,21 +42,20 @@ 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.000466 + Fee to the baker: ꜩ0.00052 Expected counter: 2 - Gas limit: 2122 + Gas limit: 2665 Storage limit: 0 bytes Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.000466 - payload fees(the block proposer) ....... +ꜩ0.000466 + [PUBLIC_KEY_HASH] ... -ꜩ0.00052 + payload fees(the block proposer) ....... +ꜩ0.00052 Tx rollup transaction:[TX_ROLLUP_HASH], 4 bytes, From: [PUBLIC_KEY_HASH] This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2021.390 + Consumed gas: 2564.880 ./tezos-client rpc get '/chains/main/blocks/head/context/tx_rollup/[TX_ROLLUP_HASH]/inbox/0' { "inbox_length": 1, "cumulated_size": 4, - "merkle_root": "[TX_ROLLUP_INBOX_HASH]", - "orphan": true } + "merkle_root": "[TX_ROLLUP_INBOX_HASH]" } diff --git a/tezt/_regressions/tx_rollup_rpc_pending_bonded_commitments.out b/tezt/_regressions/tx_rollup_rpc_pending_bonded_commitments.out index 6acf4d1b652d..5cdfb5ed7fbb 100644 --- a/tezt/_regressions/tx_rollup_rpc_pending_bonded_commitments.out +++ b/tezt/_regressions/tx_rollup_rpc_pending_bonded_commitments.out @@ -2,7 +2,7 @@ tx_rollup_rpc_pending_bonded_commitments.out ./tezos-client --wait none originate tx rollup from '[PUBLIC_KEY_HASH]' --burn-cap 9999999 --storage-limit 60000 Node is bootstrapped. -Estimated gas: 1410.108 units (will add 100 for safety) +Estimated gas: 1410.112 units (will add 100 for safety) Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' NOT waiting for the operation to be included. @@ -25,13 +25,13 @@ This sequence of operations was run: Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ15 storage fees ........................... +ꜩ15 - Consumed gas: 1410.108 + Consumed gas: 1410.112 Originated tx rollup: [TX_ROLLUP_HASH] ./tezos-client --wait none submit tx rollup batch 626c6f62 to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' Node is bootstrapped. -Estimated gas: 2021.390 units (will add 100 for safety) +Estimated gas: 2564.880 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -42,23 +42,23 @@ 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.000466 + Fee to the baker: ꜩ0.00052 Expected counter: 2 - Gas limit: 2122 + Gas limit: 2665 Storage limit: 0 bytes Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.000466 - payload fees(the block proposer) ....... +ꜩ0.000466 + [PUBLIC_KEY_HASH] ... -ꜩ0.00052 + payload fees(the block proposer) ....... +ꜩ0.00052 Tx rollup transaction:[TX_ROLLUP_HASH], 4 bytes, From: [PUBLIC_KEY_HASH] This tx rollup submit operation was successfully applied Balance updates: - Consumed gas: 2021.390 + Consumed gas: 2564.880 ./tezos-client --wait none submit tx rollup commitment 0 '[TX_ROLLUP_INBOX_HASH]' '[TX_ROLLUP_MESSAGE_RESULT_HASH]' to '[TX_ROLLUP_HASH]' from '[PUBLIC_KEY_HASH]' Node is bootstrapped. -Estimated gas: 3471.272 units (will add 100 for safety) +Estimated gas: 3453.146 units (will add 100 for safety) Estimated storage: no bytes added Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' @@ -69,20 +69,20 @@ 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.000675 + Fee to the baker: ꜩ0.000673 Expected counter: 3 - Gas limit: 3572 + Gas limit: 3554 Storage limit: 0 bytes Balance updates: - [PUBLIC_KEY_HASH] ... -ꜩ0.000675 - payload fees(the block proposer) ....... +ꜩ0.000675 + [PUBLIC_KEY_HASH] ... -ꜩ0.000673 + payload fees(the block proposer) ....... +ꜩ0.000673 Tx rollup commitment:[TX_ROLLUP_HASH], commitment 0 : messages = [TX_ROLLUP_MESSAGE_RESULT_HASH] predecessor for inbox with merkle root [TX_ROLLUP_INBOX_HASH] From: [PUBLIC_KEY_HASH] This tx rollup commit operation was successfully applied Balance updates: [PUBLIC_KEY_HASH] ....................................................... -ꜩ10000 Frozen_bonds([PUBLIC_KEY_HASH],[TX_ROLLUP_HASH]) ... +ꜩ10000 - Consumed gas: 3471.272 + Consumed gas: 3453.146 ./tezos-client rpc get '/chains/main/blocks/head/context/tx_rollup/[TX_ROLLUP_HASH]/pending_bonded_commitments/[PUBLIC_KEY_HASH]' diff --git a/tezt/_regressions/tx_rollup_rpc_state.out b/tezt/_regressions/tx_rollup_rpc_state.out index 5ce4d4006fb5..81383f13ef3c 100644 --- a/tezt/_regressions/tx_rollup_rpc_state.out +++ b/tezt/_regressions/tx_rollup_rpc_state.out @@ -2,7 +2,7 @@ tx_rollup_rpc_state.out ./tezos-client --wait none originate tx rollup from '[PUBLIC_KEY_HASH]' --burn-cap 9999999 --storage-limit 60000 Node is bootstrapped. -Estimated gas: 1410.108 units (will add 100 for safety) +Estimated gas: 1410.112 units (will add 100 for safety) Operation successfully injected in the node. Operation hash is '[OPERATION_HASH]' NOT waiting for the operation to be included. @@ -25,7 +25,7 @@ This sequence of operations was run: Balance updates: [PUBLIC_KEY_HASH] ... -ꜩ15 storage fees ........................... +ꜩ15 - Consumed gas: 1410.108 + Consumed gas: 1410.112 Originated tx rollup: [TX_ROLLUP_HASH] @@ -35,4 +35,5 @@ This sequence of operations was run: "unfinalized_commitments": { "next": 0 }, "uncommitted_inboxes": { "next": 0 }, "commitment_newest_hash": null, "tezos_head_level": null, "burn_per_byte": "0", - "allocated_storage": "60000", "occupied_storage": "0", "inbox_ema": 0 } + "allocated_storage": "60000", "occupied_storage": "0", "inbox_ema": 0, + "commitments_watermark": null } -- GitLab From e6ac4a107f513f00131fae71bd0f17dd7c7985f3 Mon Sep 17 00:00:00 2001 From: Thomas Letan Date: Mon, 28 Mar 2022 19:03:33 +0200 Subject: [PATCH 20/20] Tezt: Reset mempool regression outputs --- .../_regressions/rpc/alpha.client.mempool.out | 890 +++++++++++++++--- tezt/_regressions/rpc/alpha.client.others.out | 4 +- tezt/_regressions/rpc/alpha.light.others.out | 4 +- tezt/_regressions/rpc/alpha.proxy.mempool.out | 890 +++++++++++++++--- tezt/_regressions/rpc/alpha.proxy.others.out | 4 +- .../alpha.proxy_server_data_dir.others.out | 4 +- .../rpc/alpha.proxy_server_rpc.others.out | 4 +- .../_regressions/tx_rollup_rpc_commitment.out | 2 +- tezt/lib_tezos/tezos_regression.ml | 1 + 9 files changed, 1548 insertions(+), 255 deletions(-) diff --git a/tezt/_regressions/rpc/alpha.client.mempool.out b/tezt/_regressions/rpc/alpha.client.mempool.out index a526b2cba065..cf7ba36b9ebf 100644 --- a/tezt/_regressions/rpc/alpha.client.mempool.out +++ b/tezt/_regressions/rpc/alpha.client.mempool.out @@ -656,7 +656,11 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "$ref": "#/definitions/unistring" }, "Message_result_hash": { - "title": "A message result (Base58Check-encoded)", + "title": "A message result hash (Base58Check-encoded)", + "$ref": "#/definitions/unistring" + }, + "Message_result_list_hash": { + "title": "A merklised message result list hash (Base58Check-encoded)", "$ref": "#/definitions/unistring" }, "Operation_hash": { @@ -687,8 +691,8 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "title": "The hash of a BLS public key used to identify a L2 ticket holders (Base58Check-encoded)", "$ref": "#/definitions/unistring" }, - "Withdrawal_list_hash": { - "title": "A merkle root hash for withdrawals (Base58Check-encoded)", + "Withdraw_list_hash": { + "title": "A list of withdraw orders (Base58Check-encoded)", "$ref": "#/definitions/unistring" }, "alpha.block_header.alpha.full_header": { @@ -1935,7 +1939,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "minimum": -2147483648, "maximum": 2147483647 }, - "batches": { + "messages": { "type": "array", "items": { "$ref": "#/definitions/Message_result_hash" @@ -1960,7 +1964,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "required": [ "inbox_merkle_root", "predecessor", - "batches", + "messages", "level" ], "additionalProperties": false @@ -2192,22 +2196,37 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "$ref": "#/definitions/Inbox_list_hash" } }, + "message_result_hash": { + "$ref": "#/definitions/Message_result_hash" + }, + "message_result_path": { + "type": "array", + "items": { + "$ref": "#/definitions/Message_result_list_hash" + } + }, "previous_message_result": { "type": "object", "properties": { "context_hash": { "$ref": "#/definitions/Context_hash" }, - "withdrawals_merkle_root": { - "$ref": "#/definitions/Withdrawal_list_hash" + "withdraw_list_hash": { + "$ref": "#/definitions/Withdraw_list_hash" } }, "required": [ - "withdrawals_merkle_root", + "withdraw_list_hash", "context_hash" ], "additionalProperties": false }, + "previous_message_result_path": { + "type": "array", + "items": { + "$ref": "#/definitions/Message_result_list_hash" + } + }, "proof": { "type": "object", "properties": { @@ -2493,7 +2512,10 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, "required": [ "proof", + "previous_message_result_path", "previous_message_result", + "message_result_path", + "message_result_hash", "message_path", "message_position", "message", @@ -2509,13 +2531,13 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "additionalProperties": false }, { - "title": "Tx_rollup_withdraw", + "title": "Tx_rollup_dispatch_tickets", "type": "object", "properties": { "kind": { "type": "string", "enum": [ - "tx_rollup_withdraw" + "tx_rollup_dispatch_tickets" ] }, "source": { @@ -2549,19 +2571,232 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "minimum": -1073741824, "maximum": 1073741823 }, - "withdrawals_merkle_root": { - "$ref": "#/definitions/Withdrawal_list_hash" + "message_result_path": { + "type": "array", + "items": { + "$ref": "#/definitions/Message_result_list_hash" + } }, - "withdraw_path": { + "tickets_info": { "type": "array", "items": { - "$ref": "#/definitions/Withdrawal_list_hash" + "type": "object", + "properties": { + "contents": { + "oneOf": [ + { + "title": "Int", + "type": "object", + "properties": { + "int": { + "$ref": "#/definitions/bignum" + } + }, + "required": [ + "int" + ], + "additionalProperties": false + }, + { + "title": "String", + "type": "object", + "properties": { + "string": { + "$ref": "#/definitions/unistring" + } + }, + "required": [ + "string" + ], + "additionalProperties": false + }, + { + "title": "Bytes", + "type": "object", + "properties": { + "bytes": { + "type": "string", + "pattern": "^([a-zA-Z0-9][a-zA-Z0-9])*$" + } + }, + "required": [ + "bytes" + ], + "additionalProperties": false + }, + { + "title": "Sequence", + "type": "array", + "items": { + "$ref": "#/definitions/micheline.alpha.michelson_v1.expression" + } + }, + { + "title": "Prim__generic", + "description": "Generic primitive (any number of args with or without annotations)", + "type": "object", + "properties": { + "prim": { + "$ref": "#/definitions/alpha.michelson.v1.primitives" + }, + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/micheline.alpha.michelson_v1.expression" + } + }, + "annots": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "prim" + ], + "additionalProperties": false + } + ] + }, + "ty": { + "oneOf": [ + { + "title": "Int", + "type": "object", + "properties": { + "int": { + "$ref": "#/definitions/bignum" + } + }, + "required": [ + "int" + ], + "additionalProperties": false + }, + { + "title": "String", + "type": "object", + "properties": { + "string": { + "$ref": "#/definitions/unistring" + } + }, + "required": [ + "string" + ], + "additionalProperties": false + }, + { + "title": "Bytes", + "type": "object", + "properties": { + "bytes": { + "type": "string", + "pattern": "^([a-zA-Z0-9][a-zA-Z0-9])*$" + } + }, + "required": [ + "bytes" + ], + "additionalProperties": false + }, + { + "title": "Sequence", + "type": "array", + "items": { + "$ref": "#/definitions/micheline.alpha.michelson_v1.expression" + } + }, + { + "title": "Prim__generic", + "description": "Generic primitive (any number of args with or without annotations)", + "type": "object", + "properties": { + "prim": { + "$ref": "#/definitions/alpha.michelson.v1.primitives" + }, + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/micheline.alpha.michelson_v1.expression" + } + }, + "annots": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "prim" + ], + "additionalProperties": false + } + ] + }, + "ticketer": { + "$ref": "#/definitions/alpha.contract_id" + }, + "amount": { + "$ref": "#/definitions/int64" + }, + "claimer": { + "$ref": "#/definitions/Signature.Public_key_hash" + } + }, + "required": [ + "claimer", + "amount", + "ticketer", + "ty", + "contents" + ], + "additionalProperties": false } + } + }, + "required": [ + "tickets_info", + "message_result_path", + "message_index", + "context_hash", + "level", + "tx_rollup", + "storage_limit", + "gas_limit", + "counter", + "fee", + "source", + "kind" + ], + "additionalProperties": false + }, + { + "title": "Transfer_ticket", + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "transfer_ticket" + ] }, - "withdraw_position": { - "type": "integer", - "minimum": -1073741824, - "maximum": 1073741823 + "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" }, "ticket_contents": { "oneOf": [ @@ -2721,7 +2956,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "$ref": "#/definitions/alpha.contract_id" }, "ticket_amount": { - "$ref": "#/definitions/int64" + "$ref": "#/definitions/positive_bignum" }, "destination": { "$ref": "#/definitions/alpha.contract_id" @@ -2737,13 +2972,6 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "ticket_ticketer", "ticket_ty", "ticket_contents", - "withdraw_position", - "withdraw_path", - "withdrawals_merkle_root", - "message_index", - "context_hash", - "level", - "tx_rollup", "storage_limit", "gas_limit", "counter", @@ -4129,7 +4357,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' { "name": "parameters", "layout": { - "name": "X_136", + "name": "X_137", "kind": "Ref" }, "data_kind": { @@ -4794,7 +5022,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' { "name": "commitment", "layout": { - "name": "X_134", + "name": "X_135", "kind": "Ref" }, "data_kind": { @@ -5157,7 +5385,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' { "name": "message", "layout": { - "name": "X_7", + "name": "X_8", "kind": "Ref" }, "data_kind": { @@ -5194,10 +5422,39 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, "kind": "named" }, + { + "name": "message_result_hash", + "layout": { + "kind": "Bytes" + }, + "data_kind": { + "size": 32, + "kind": "Float" + }, + "kind": "named" + }, + { + "kind": "dyn", + "num_fields": 1, + "size": "Uint30" + }, + { + "name": "message_result_path", + "layout": { + "layout": { + "kind": "Bytes" + }, + "kind": "Seq" + }, + "data_kind": { + "kind": "Variable" + }, + "kind": "named" + }, { "name": "previous_message_result", "layout": { - "name": "X_8", + "name": "X_9", "kind": "Ref" }, "data_kind": { @@ -5206,10 +5463,28 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, "kind": "named" }, + { + "kind": "dyn", + "num_fields": 1, + "size": "Uint30" + }, + { + "name": "previous_message_result_path", + "layout": { + "layout": { + "kind": "Bytes" + }, + "kind": "Seq" + }, + "data_kind": { + "kind": "Variable" + }, + "kind": "named" + }, { "name": "proof", "layout": { - "name": "X_133", + "name": "X_134", "kind": "Ref" }, "data_kind": { @@ -5339,13 +5614,20 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "kind": "named" }, { - "name": "withdrawals_merkle_root", + "kind": "dyn", + "num_fields": 1, + "size": "Uint30" + }, + { + "name": "message_result_path", "layout": { - "kind": "Bytes" + "layout": { + "kind": "Bytes" + }, + "kind": "Seq" }, "data_kind": { - "size": 32, - "kind": "Float" + "kind": "Variable" }, "kind": "named" }, @@ -5355,10 +5637,11 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "size": "Uint30" }, { - "name": "withdraw_path", + "name": "tickets_info", "layout": { "layout": { - "kind": "Bytes" + "name": "X_4", + "kind": "Ref" }, "kind": "Seq" }, @@ -5366,17 +5649,78 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "kind": "Variable" }, "kind": "named" + } + ], + "name": "Tx_rollup_dispatch_tickets" + }, + { + "tag": 158, + "fields": [ + { + "name": "Tag", + "layout": { + "size": "Uint8", + "kind": "Int" + }, + "data_kind": { + "size": 1, + "kind": "Float" + }, + "kind": "named" }, { - "name": "withdraw_position", + "name": "source", "layout": { - "min": -1073741824, - "max": 1073741823, - "kind": "RangedInt" + "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": { - "size": 4, - "kind": "Float" + "kind": "Dynamic" }, "kind": "named" }, @@ -5425,7 +5769,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' { "name": "ticket_amount", "layout": { - "name": "X_6", + "name": "N.t", "kind": "Ref" }, "data_kind": { @@ -5461,7 +5805,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "kind": "named" } ], - "name": "Tx_rollup_withdraw" + "name": "Transfer_ticket" }, { "tag": 200, @@ -6549,7 +6893,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "description": { - "title": "X_136" + "title": "X_137" }, "encoding": { "fields": [ @@ -6932,7 +7276,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "description": { - "title": "X_134" + "title": "X_135" }, "encoding": { "fields": [ @@ -6954,7 +7298,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "size": "Uint30" }, { - "name": "batches", + "name": "messages", "layout": { "layout": { "kind": "Bytes" @@ -6969,7 +7313,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' { "name": "predecessor", "layout": { - "name": "X_135", + "name": "X_136", "kind": "Ref" }, "data_kind": { @@ -6993,7 +7337,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "description": { - "title": "X_135" + "title": "X_136" }, "encoding": { "tag_size": "Uint8", @@ -7063,7 +7407,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "description": { - "title": "X_133" + "title": "X_134" }, "encoding": { "tag_size": "Uint8", @@ -7119,7 +7463,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_9", + "name": "X_10", "kind": "Ref" }, "kind": "anon", @@ -7178,7 +7522,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_9", + "name": "X_10", "kind": "Ref" }, "kind": "anon", @@ -7237,7 +7581,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_9", + "name": "X_10", "kind": "Ref" }, "kind": "anon", @@ -7296,7 +7640,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_9", + "name": "X_10", "kind": "Ref" }, "kind": "anon", @@ -7312,7 +7656,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "description": { - "title": "X_132" + "title": "X_133" }, "encoding": { "tag_size": "Uint8", @@ -7348,7 +7692,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_131", + "name": "X_132", "kind": "Ref" }, "kind": "anon", @@ -7388,7 +7732,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_131", + "name": "X_132", "kind": "Ref" }, "kind": "anon", @@ -7428,7 +7772,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_131", + "name": "X_132", "kind": "Ref" }, "kind": "anon", @@ -7468,7 +7812,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_131", + "name": "X_132", "kind": "Ref" }, "kind": "anon", @@ -7508,7 +7852,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_127", + "name": "X_128", "kind": "Ref" }, "kind": "anon", @@ -7548,7 +7892,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_127", + "name": "X_128", "kind": "Ref" }, "kind": "anon", @@ -7588,7 +7932,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_127", + "name": "X_128", "kind": "Ref" }, "kind": "anon", @@ -7628,7 +7972,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_127", + "name": "X_128", "kind": "Ref" }, "kind": "anon", @@ -7668,7 +8012,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_127", + "name": "X_128", "kind": "Ref" }, "kind": "anon", @@ -7708,7 +8052,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_127", + "name": "X_128", "kind": "Ref" }, "kind": "anon", @@ -7748,7 +8092,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_127", + "name": "X_128", "kind": "Ref" }, "kind": "anon", @@ -7788,7 +8132,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_127", + "name": "X_128", "kind": "Ref" }, "kind": "anon", @@ -7828,7 +8172,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_119", + "name": "X_120", "kind": "Ref" }, "kind": "anon", @@ -7868,7 +8212,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_119", + "name": "X_120", "kind": "Ref" }, "kind": "anon", @@ -7908,7 +8252,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_119", + "name": "X_120", "kind": "Ref" }, "kind": "anon", @@ -7948,7 +8292,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_119", + "name": "X_120", "kind": "Ref" }, "kind": "anon", @@ -8006,7 +8350,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' { "layout": { "layout": { - "name": "X_14", + "name": "X_15", "kind": "Ref" }, "kind": "Seq", @@ -8041,7 +8385,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' { "layout": { "layout": { - "name": "X_14", + "name": "X_15", "kind": "Ref" }, "kind": "Seq", @@ -8081,7 +8425,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' { "layout": { "layout": { - "name": "X_14", + "name": "X_15", "kind": "Ref" }, "kind": "Seq" @@ -8218,7 +8562,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_114", + "name": "X_115", "kind": "Ref" }, "kind": "anon", @@ -8267,7 +8611,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_114", + "name": "X_115", "kind": "Ref" }, "kind": "anon", @@ -8316,7 +8660,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_114", + "name": "X_115", "kind": "Ref" }, "kind": "anon", @@ -8365,7 +8709,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_114", + "name": "X_115", "kind": "Ref" }, "kind": "anon", @@ -8391,7 +8735,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "description": { - "title": "X_131" + "title": "X_132" }, "encoding": { "fields": [] @@ -8399,7 +8743,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "description": { - "title": "X_127" + "title": "X_128" }, "encoding": { "fields": [ @@ -8418,7 +8762,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "description": { - "title": "X_119" + "title": "X_120" }, "encoding": { "fields": [ @@ -8447,7 +8791,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "description": { - "title": "X_115" + "title": "X_116" }, "encoding": { "tag_size": "Uint8", @@ -8519,7 +8863,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "description": { - "title": "X_114" + "title": "X_115" }, "encoding": { "fields": [ @@ -8542,7 +8886,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "description": { - "title": "X_9" + "title": "X_10" }, "encoding": { "fields": [ @@ -8554,7 +8898,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' { "layout": { "layout": { - "name": "X_132", + "name": "X_133", "kind": "Ref" }, "kind": "Seq" @@ -8569,13 +8913,13 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "description": { - "title": "X_14" + "title": "X_15" }, "encoding": { "fields": [ { "layout": { - "name": "X_114", + "name": "X_115", "kind": "Ref" }, "kind": "anon", @@ -8585,7 +8929,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_115", + "name": "X_116", "kind": "Ref" }, "kind": "anon", @@ -8599,7 +8943,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "description": { - "title": "X_8" + "title": "X_9" }, "encoding": { "fields": [ @@ -8615,7 +8959,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "kind": "named" }, { - "name": "withdrawals_merkle_root", + "name": "withdraw_list_hash", "layout": { "kind": "Bytes" }, @@ -8630,7 +8974,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "description": { - "title": "X_7" + "title": "X_8" }, "encoding": { "tag_size": "Uint8", @@ -8689,7 +9033,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' { "name": "deposit", "layout": { - "name": "X_5", + "name": "X_6", "kind": "Ref" }, "data_kind": { @@ -8705,7 +9049,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "description": { - "title": "X_5" + "title": "X_6" }, "encoding": { "fields": [ @@ -8746,7 +9090,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' { "name": "amount", "layout": { - "name": "X_6", + "name": "X_7", "kind": "Ref" }, "data_kind": { @@ -8759,7 +9103,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "description": { - "title": "X_6" + "title": "X_7" }, "encoding": { "tag_size": "Uint8", @@ -8886,6 +9230,80 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' ] } }, + { + "description": { + "title": "X_4" + }, + "encoding": { + "fields": [ + { + "kind": "dyn", + "num_fields": 1, + "size": "Uint30" + }, + { + "name": "contents", + "layout": { + "kind": "Bytes" + }, + "data_kind": { + "kind": "Variable" + }, + "kind": "named" + }, + { + "kind": "dyn", + "num_fields": 1, + "size": "Uint30" + }, + { + "name": "ty", + "layout": { + "kind": "Bytes" + }, + "data_kind": { + "kind": "Variable" + }, + "kind": "named" + }, + { + "name": "ticketer", + "layout": { + "name": "alpha.contract_id", + "kind": "Ref" + }, + "data_kind": { + "size": 22, + "kind": "Float" + }, + "kind": "named" + }, + { + "name": "amount", + "layout": { + "name": "X_7", + "kind": "Ref" + }, + "data_kind": { + "kind": "Dynamic" + }, + "kind": "named" + }, + { + "name": "claimer", + "layout": { + "name": "public_key_hash", + "kind": "Ref" + }, + "data_kind": { + "size": 21, + "kind": "Float" + }, + "kind": "named" + } + ] + } + }, { "description": { "title": "alpha.contract_id" @@ -9731,7 +10149,11 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "$ref": "#/definitions/unistring" }, "Message_result_hash": { - "title": "A message result (Base58Check-encoded)", + "title": "A message result hash (Base58Check-encoded)", + "$ref": "#/definitions/unistring" + }, + "Message_result_list_hash": { + "title": "A merklised message result list hash (Base58Check-encoded)", "$ref": "#/definitions/unistring" }, "Operation_hash": { @@ -9762,8 +10184,8 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "title": "The hash of a BLS public key used to identify a L2 ticket holders (Base58Check-encoded)", "$ref": "#/definitions/unistring" }, - "Withdrawal_list_hash": { - "title": "A merkle root hash for withdrawals (Base58Check-encoded)", + "Withdraw_list_hash": { + "title": "A list of withdraw orders (Base58Check-encoded)", "$ref": "#/definitions/unistring" }, "alpha.block_header.alpha.full_header": { @@ -11010,7 +11432,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "minimum": -2147483648, "maximum": 2147483647 }, - "batches": { + "messages": { "type": "array", "items": { "$ref": "#/definitions/Message_result_hash" @@ -11035,7 +11457,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "required": [ "inbox_merkle_root", "predecessor", - "batches", + "messages", "level" ], "additionalProperties": false @@ -11267,22 +11689,37 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "$ref": "#/definitions/Inbox_list_hash" } }, + "message_result_hash": { + "$ref": "#/definitions/Message_result_hash" + }, + "message_result_path": { + "type": "array", + "items": { + "$ref": "#/definitions/Message_result_list_hash" + } + }, "previous_message_result": { "type": "object", "properties": { "context_hash": { "$ref": "#/definitions/Context_hash" }, - "withdrawals_merkle_root": { - "$ref": "#/definitions/Withdrawal_list_hash" + "withdraw_list_hash": { + "$ref": "#/definitions/Withdraw_list_hash" } }, "required": [ - "withdrawals_merkle_root", + "withdraw_list_hash", "context_hash" ], "additionalProperties": false }, + "previous_message_result_path": { + "type": "array", + "items": { + "$ref": "#/definitions/Message_result_list_hash" + } + }, "proof": { "type": "object", "properties": { @@ -11568,7 +12005,10 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, "required": [ "proof", + "previous_message_result_path", "previous_message_result", + "message_result_path", + "message_result_hash", "message_path", "message_position", "message", @@ -11584,13 +12024,13 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "additionalProperties": false }, { - "title": "Tx_rollup_withdraw", + "title": "Tx_rollup_dispatch_tickets", "type": "object", "properties": { "kind": { "type": "string", "enum": [ - "tx_rollup_withdraw" + "tx_rollup_dispatch_tickets" ] }, "source": { @@ -11624,19 +12064,232 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "minimum": -1073741824, "maximum": 1073741823 }, - "withdrawals_merkle_root": { - "$ref": "#/definitions/Withdrawal_list_hash" + "message_result_path": { + "type": "array", + "items": { + "$ref": "#/definitions/Message_result_list_hash" + } }, - "withdraw_path": { + "tickets_info": { "type": "array", "items": { - "$ref": "#/definitions/Withdrawal_list_hash" + "type": "object", + "properties": { + "contents": { + "oneOf": [ + { + "title": "Int", + "type": "object", + "properties": { + "int": { + "$ref": "#/definitions/bignum" + } + }, + "required": [ + "int" + ], + "additionalProperties": false + }, + { + "title": "String", + "type": "object", + "properties": { + "string": { + "$ref": "#/definitions/unistring" + } + }, + "required": [ + "string" + ], + "additionalProperties": false + }, + { + "title": "Bytes", + "type": "object", + "properties": { + "bytes": { + "type": "string", + "pattern": "^([a-zA-Z0-9][a-zA-Z0-9])*$" + } + }, + "required": [ + "bytes" + ], + "additionalProperties": false + }, + { + "title": "Sequence", + "type": "array", + "items": { + "$ref": "#/definitions/micheline.alpha.michelson_v1.expression" + } + }, + { + "title": "Prim__generic", + "description": "Generic primitive (any number of args with or without annotations)", + "type": "object", + "properties": { + "prim": { + "$ref": "#/definitions/alpha.michelson.v1.primitives" + }, + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/micheline.alpha.michelson_v1.expression" + } + }, + "annots": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "prim" + ], + "additionalProperties": false + } + ] + }, + "ty": { + "oneOf": [ + { + "title": "Int", + "type": "object", + "properties": { + "int": { + "$ref": "#/definitions/bignum" + } + }, + "required": [ + "int" + ], + "additionalProperties": false + }, + { + "title": "String", + "type": "object", + "properties": { + "string": { + "$ref": "#/definitions/unistring" + } + }, + "required": [ + "string" + ], + "additionalProperties": false + }, + { + "title": "Bytes", + "type": "object", + "properties": { + "bytes": { + "type": "string", + "pattern": "^([a-zA-Z0-9][a-zA-Z0-9])*$" + } + }, + "required": [ + "bytes" + ], + "additionalProperties": false + }, + { + "title": "Sequence", + "type": "array", + "items": { + "$ref": "#/definitions/micheline.alpha.michelson_v1.expression" + } + }, + { + "title": "Prim__generic", + "description": "Generic primitive (any number of args with or without annotations)", + "type": "object", + "properties": { + "prim": { + "$ref": "#/definitions/alpha.michelson.v1.primitives" + }, + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/micheline.alpha.michelson_v1.expression" + } + }, + "annots": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "prim" + ], + "additionalProperties": false + } + ] + }, + "ticketer": { + "$ref": "#/definitions/alpha.contract_id" + }, + "amount": { + "$ref": "#/definitions/int64" + }, + "claimer": { + "$ref": "#/definitions/Signature.Public_key_hash" + } + }, + "required": [ + "claimer", + "amount", + "ticketer", + "ty", + "contents" + ], + "additionalProperties": false } + } + }, + "required": [ + "tickets_info", + "message_result_path", + "message_index", + "context_hash", + "level", + "tx_rollup", + "storage_limit", + "gas_limit", + "counter", + "fee", + "source", + "kind" + ], + "additionalProperties": false + }, + { + "title": "Transfer_ticket", + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "transfer_ticket" + ] }, - "withdraw_position": { - "type": "integer", - "minimum": -1073741824, - "maximum": 1073741823 + "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" }, "ticket_contents": { "oneOf": [ @@ -11796,7 +12449,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "$ref": "#/definitions/alpha.contract_id" }, "ticket_amount": { - "$ref": "#/definitions/int64" + "$ref": "#/definitions/positive_bignum" }, "destination": { "$ref": "#/definitions/alpha.contract_id" @@ -11812,13 +12465,6 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "ticket_ticketer", "ticket_ty", "ticket_contents", - "withdraw_position", - "withdraw_path", - "withdrawals_merkle_root", - "message_index", - "context_hash", - "level", - "tx_rollup", "storage_limit", "gas_limit", "counter", diff --git a/tezt/_regressions/rpc/alpha.client.others.out b/tezt/_regressions/rpc/alpha.client.others.out index 25087b4ae8df..1c9153bdf19f 100644 --- a/tezt/_regressions/rpc/alpha.client.others.out +++ b/tezt/_regressions/rpc/alpha.client.others.out @@ -32,14 +32,14 @@ rpc/alpha.client.others.out "tx_rollup_enable": true, "tx_rollup_origination_size": 60000, "tx_rollup_hard_size_limit_per_inbox": 100000, "tx_rollup_hard_size_limit_per_message": 5000, - "tx_rollup_max_withdrawals_per_batch": 255, + "tx_rollup_max_withdrawals_per_batch": 15, "tx_rollup_commitment_bond": "10000000000", "tx_rollup_finality_period": 60000, "tx_rollup_withdraw_period": 60000, "tx_rollup_max_inboxes_count": 60100, "tx_rollup_max_messages_per_inbox": 1010, "tx_rollup_max_commitments_count": 120100, "tx_rollup_cost_per_byte_ema_factor": 120, - "tx_rollup_max_ticket_payload_size": 10240, + "tx_rollup_max_ticket_payload_size": 2048, "tx_rollup_rejection_max_proof_size": 30000, "sc_rollup_enable": false, "sc_rollup_origination_size": 6314, "sc_rollup_challenge_window_in_blocks": 20160, diff --git a/tezt/_regressions/rpc/alpha.light.others.out b/tezt/_regressions/rpc/alpha.light.others.out index b2b7cc590d5e..9f39848adc83 100644 --- a/tezt/_regressions/rpc/alpha.light.others.out +++ b/tezt/_regressions/rpc/alpha.light.others.out @@ -32,14 +32,14 @@ rpc/alpha.light.others.out "tx_rollup_enable": true, "tx_rollup_origination_size": 60000, "tx_rollup_hard_size_limit_per_inbox": 100000, "tx_rollup_hard_size_limit_per_message": 5000, - "tx_rollup_max_withdrawals_per_batch": 255, + "tx_rollup_max_withdrawals_per_batch": 15, "tx_rollup_commitment_bond": "10000000000", "tx_rollup_finality_period": 60000, "tx_rollup_withdraw_period": 60000, "tx_rollup_max_inboxes_count": 60100, "tx_rollup_max_messages_per_inbox": 1010, "tx_rollup_max_commitments_count": 120100, "tx_rollup_cost_per_byte_ema_factor": 120, - "tx_rollup_max_ticket_payload_size": 10240, + "tx_rollup_max_ticket_payload_size": 2048, "tx_rollup_rejection_max_proof_size": 30000, "sc_rollup_enable": false, "sc_rollup_origination_size": 6314, "sc_rollup_challenge_window_in_blocks": 20160, diff --git a/tezt/_regressions/rpc/alpha.proxy.mempool.out b/tezt/_regressions/rpc/alpha.proxy.mempool.out index c0776cc3db49..80ef49f6a42a 100644 --- a/tezt/_regressions/rpc/alpha.proxy.mempool.out +++ b/tezt/_regressions/rpc/alpha.proxy.mempool.out @@ -677,7 +677,11 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "$ref": "#/definitions/unistring" }, "Message_result_hash": { - "title": "A message result (Base58Check-encoded)", + "title": "A message result hash (Base58Check-encoded)", + "$ref": "#/definitions/unistring" + }, + "Message_result_list_hash": { + "title": "A merklised message result list hash (Base58Check-encoded)", "$ref": "#/definitions/unistring" }, "Operation_hash": { @@ -708,8 +712,8 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "title": "The hash of a BLS public key used to identify a L2 ticket holders (Base58Check-encoded)", "$ref": "#/definitions/unistring" }, - "Withdrawal_list_hash": { - "title": "A merkle root hash for withdrawals (Base58Check-encoded)", + "Withdraw_list_hash": { + "title": "A list of withdraw orders (Base58Check-encoded)", "$ref": "#/definitions/unistring" }, "alpha.block_header.alpha.full_header": { @@ -1956,7 +1960,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "minimum": -2147483648, "maximum": 2147483647 }, - "batches": { + "messages": { "type": "array", "items": { "$ref": "#/definitions/Message_result_hash" @@ -1981,7 +1985,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "required": [ "inbox_merkle_root", "predecessor", - "batches", + "messages", "level" ], "additionalProperties": false @@ -2213,22 +2217,37 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "$ref": "#/definitions/Inbox_list_hash" } }, + "message_result_hash": { + "$ref": "#/definitions/Message_result_hash" + }, + "message_result_path": { + "type": "array", + "items": { + "$ref": "#/definitions/Message_result_list_hash" + } + }, "previous_message_result": { "type": "object", "properties": { "context_hash": { "$ref": "#/definitions/Context_hash" }, - "withdrawals_merkle_root": { - "$ref": "#/definitions/Withdrawal_list_hash" + "withdraw_list_hash": { + "$ref": "#/definitions/Withdraw_list_hash" } }, "required": [ - "withdrawals_merkle_root", + "withdraw_list_hash", "context_hash" ], "additionalProperties": false }, + "previous_message_result_path": { + "type": "array", + "items": { + "$ref": "#/definitions/Message_result_list_hash" + } + }, "proof": { "type": "object", "properties": { @@ -2514,7 +2533,10 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, "required": [ "proof", + "previous_message_result_path", "previous_message_result", + "message_result_path", + "message_result_hash", "message_path", "message_position", "message", @@ -2530,13 +2552,13 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "additionalProperties": false }, { - "title": "Tx_rollup_withdraw", + "title": "Tx_rollup_dispatch_tickets", "type": "object", "properties": { "kind": { "type": "string", "enum": [ - "tx_rollup_withdraw" + "tx_rollup_dispatch_tickets" ] }, "source": { @@ -2570,19 +2592,232 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "minimum": -1073741824, "maximum": 1073741823 }, - "withdrawals_merkle_root": { - "$ref": "#/definitions/Withdrawal_list_hash" + "message_result_path": { + "type": "array", + "items": { + "$ref": "#/definitions/Message_result_list_hash" + } }, - "withdraw_path": { + "tickets_info": { "type": "array", "items": { - "$ref": "#/definitions/Withdrawal_list_hash" + "type": "object", + "properties": { + "contents": { + "oneOf": [ + { + "title": "Int", + "type": "object", + "properties": { + "int": { + "$ref": "#/definitions/bignum" + } + }, + "required": [ + "int" + ], + "additionalProperties": false + }, + { + "title": "String", + "type": "object", + "properties": { + "string": { + "$ref": "#/definitions/unistring" + } + }, + "required": [ + "string" + ], + "additionalProperties": false + }, + { + "title": "Bytes", + "type": "object", + "properties": { + "bytes": { + "type": "string", + "pattern": "^([a-zA-Z0-9][a-zA-Z0-9])*$" + } + }, + "required": [ + "bytes" + ], + "additionalProperties": false + }, + { + "title": "Sequence", + "type": "array", + "items": { + "$ref": "#/definitions/micheline.alpha.michelson_v1.expression" + } + }, + { + "title": "Prim__generic", + "description": "Generic primitive (any number of args with or without annotations)", + "type": "object", + "properties": { + "prim": { + "$ref": "#/definitions/alpha.michelson.v1.primitives" + }, + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/micheline.alpha.michelson_v1.expression" + } + }, + "annots": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "prim" + ], + "additionalProperties": false + } + ] + }, + "ty": { + "oneOf": [ + { + "title": "Int", + "type": "object", + "properties": { + "int": { + "$ref": "#/definitions/bignum" + } + }, + "required": [ + "int" + ], + "additionalProperties": false + }, + { + "title": "String", + "type": "object", + "properties": { + "string": { + "$ref": "#/definitions/unistring" + } + }, + "required": [ + "string" + ], + "additionalProperties": false + }, + { + "title": "Bytes", + "type": "object", + "properties": { + "bytes": { + "type": "string", + "pattern": "^([a-zA-Z0-9][a-zA-Z0-9])*$" + } + }, + "required": [ + "bytes" + ], + "additionalProperties": false + }, + { + "title": "Sequence", + "type": "array", + "items": { + "$ref": "#/definitions/micheline.alpha.michelson_v1.expression" + } + }, + { + "title": "Prim__generic", + "description": "Generic primitive (any number of args with or without annotations)", + "type": "object", + "properties": { + "prim": { + "$ref": "#/definitions/alpha.michelson.v1.primitives" + }, + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/micheline.alpha.michelson_v1.expression" + } + }, + "annots": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "prim" + ], + "additionalProperties": false + } + ] + }, + "ticketer": { + "$ref": "#/definitions/alpha.contract_id" + }, + "amount": { + "$ref": "#/definitions/int64" + }, + "claimer": { + "$ref": "#/definitions/Signature.Public_key_hash" + } + }, + "required": [ + "claimer", + "amount", + "ticketer", + "ty", + "contents" + ], + "additionalProperties": false } + } + }, + "required": [ + "tickets_info", + "message_result_path", + "message_index", + "context_hash", + "level", + "tx_rollup", + "storage_limit", + "gas_limit", + "counter", + "fee", + "source", + "kind" + ], + "additionalProperties": false + }, + { + "title": "Transfer_ticket", + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "transfer_ticket" + ] }, - "withdraw_position": { - "type": "integer", - "minimum": -1073741824, - "maximum": 1073741823 + "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" }, "ticket_contents": { "oneOf": [ @@ -2742,7 +2977,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "$ref": "#/definitions/alpha.contract_id" }, "ticket_amount": { - "$ref": "#/definitions/int64" + "$ref": "#/definitions/positive_bignum" }, "destination": { "$ref": "#/definitions/alpha.contract_id" @@ -2758,13 +2993,6 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "ticket_ticketer", "ticket_ty", "ticket_contents", - "withdraw_position", - "withdraw_path", - "withdrawals_merkle_root", - "message_index", - "context_hash", - "level", - "tx_rollup", "storage_limit", "gas_limit", "counter", @@ -4150,7 +4378,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' { "name": "parameters", "layout": { - "name": "X_136", + "name": "X_137", "kind": "Ref" }, "data_kind": { @@ -4815,7 +5043,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' { "name": "commitment", "layout": { - "name": "X_134", + "name": "X_135", "kind": "Ref" }, "data_kind": { @@ -5178,7 +5406,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' { "name": "message", "layout": { - "name": "X_7", + "name": "X_8", "kind": "Ref" }, "data_kind": { @@ -5215,10 +5443,39 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, "kind": "named" }, + { + "name": "message_result_hash", + "layout": { + "kind": "Bytes" + }, + "data_kind": { + "size": 32, + "kind": "Float" + }, + "kind": "named" + }, + { + "kind": "dyn", + "num_fields": 1, + "size": "Uint30" + }, + { + "name": "message_result_path", + "layout": { + "layout": { + "kind": "Bytes" + }, + "kind": "Seq" + }, + "data_kind": { + "kind": "Variable" + }, + "kind": "named" + }, { "name": "previous_message_result", "layout": { - "name": "X_8", + "name": "X_9", "kind": "Ref" }, "data_kind": { @@ -5227,10 +5484,28 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, "kind": "named" }, + { + "kind": "dyn", + "num_fields": 1, + "size": "Uint30" + }, + { + "name": "previous_message_result_path", + "layout": { + "layout": { + "kind": "Bytes" + }, + "kind": "Seq" + }, + "data_kind": { + "kind": "Variable" + }, + "kind": "named" + }, { "name": "proof", "layout": { - "name": "X_133", + "name": "X_134", "kind": "Ref" }, "data_kind": { @@ -5360,13 +5635,20 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "kind": "named" }, { - "name": "withdrawals_merkle_root", + "kind": "dyn", + "num_fields": 1, + "size": "Uint30" + }, + { + "name": "message_result_path", "layout": { - "kind": "Bytes" + "layout": { + "kind": "Bytes" + }, + "kind": "Seq" }, "data_kind": { - "size": 32, - "kind": "Float" + "kind": "Variable" }, "kind": "named" }, @@ -5376,10 +5658,11 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "size": "Uint30" }, { - "name": "withdraw_path", + "name": "tickets_info", "layout": { "layout": { - "kind": "Bytes" + "name": "X_4", + "kind": "Ref" }, "kind": "Seq" }, @@ -5387,17 +5670,78 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "kind": "Variable" }, "kind": "named" + } + ], + "name": "Tx_rollup_dispatch_tickets" + }, + { + "tag": 158, + "fields": [ + { + "name": "Tag", + "layout": { + "size": "Uint8", + "kind": "Int" + }, + "data_kind": { + "size": 1, + "kind": "Float" + }, + "kind": "named" }, { - "name": "withdraw_position", + "name": "source", "layout": { - "min": -1073741824, - "max": 1073741823, - "kind": "RangedInt" + "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": { - "size": 4, - "kind": "Float" + "kind": "Dynamic" }, "kind": "named" }, @@ -5446,7 +5790,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' { "name": "ticket_amount", "layout": { - "name": "X_6", + "name": "N.t", "kind": "Ref" }, "data_kind": { @@ -5482,7 +5826,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "kind": "named" } ], - "name": "Tx_rollup_withdraw" + "name": "Transfer_ticket" }, { "tag": 200, @@ -6570,7 +6914,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "description": { - "title": "X_136" + "title": "X_137" }, "encoding": { "fields": [ @@ -6953,7 +7297,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "description": { - "title": "X_134" + "title": "X_135" }, "encoding": { "fields": [ @@ -6975,7 +7319,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "size": "Uint30" }, { - "name": "batches", + "name": "messages", "layout": { "layout": { "kind": "Bytes" @@ -6990,7 +7334,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' { "name": "predecessor", "layout": { - "name": "X_135", + "name": "X_136", "kind": "Ref" }, "data_kind": { @@ -7014,7 +7358,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "description": { - "title": "X_135" + "title": "X_136" }, "encoding": { "tag_size": "Uint8", @@ -7084,7 +7428,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "description": { - "title": "X_133" + "title": "X_134" }, "encoding": { "tag_size": "Uint8", @@ -7140,7 +7484,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_9", + "name": "X_10", "kind": "Ref" }, "kind": "anon", @@ -7199,7 +7543,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_9", + "name": "X_10", "kind": "Ref" }, "kind": "anon", @@ -7258,7 +7602,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_9", + "name": "X_10", "kind": "Ref" }, "kind": "anon", @@ -7317,7 +7661,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_9", + "name": "X_10", "kind": "Ref" }, "kind": "anon", @@ -7333,7 +7677,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "description": { - "title": "X_132" + "title": "X_133" }, "encoding": { "tag_size": "Uint8", @@ -7369,7 +7713,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_131", + "name": "X_132", "kind": "Ref" }, "kind": "anon", @@ -7409,7 +7753,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_131", + "name": "X_132", "kind": "Ref" }, "kind": "anon", @@ -7449,7 +7793,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_131", + "name": "X_132", "kind": "Ref" }, "kind": "anon", @@ -7489,7 +7833,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_131", + "name": "X_132", "kind": "Ref" }, "kind": "anon", @@ -7529,7 +7873,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_127", + "name": "X_128", "kind": "Ref" }, "kind": "anon", @@ -7569,7 +7913,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_127", + "name": "X_128", "kind": "Ref" }, "kind": "anon", @@ -7609,7 +7953,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_127", + "name": "X_128", "kind": "Ref" }, "kind": "anon", @@ -7649,7 +7993,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_127", + "name": "X_128", "kind": "Ref" }, "kind": "anon", @@ -7689,7 +8033,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_127", + "name": "X_128", "kind": "Ref" }, "kind": "anon", @@ -7729,7 +8073,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_127", + "name": "X_128", "kind": "Ref" }, "kind": "anon", @@ -7769,7 +8113,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_127", + "name": "X_128", "kind": "Ref" }, "kind": "anon", @@ -7809,7 +8153,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_127", + "name": "X_128", "kind": "Ref" }, "kind": "anon", @@ -7849,7 +8193,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_119", + "name": "X_120", "kind": "Ref" }, "kind": "anon", @@ -7889,7 +8233,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_119", + "name": "X_120", "kind": "Ref" }, "kind": "anon", @@ -7929,7 +8273,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_119", + "name": "X_120", "kind": "Ref" }, "kind": "anon", @@ -7969,7 +8313,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_119", + "name": "X_120", "kind": "Ref" }, "kind": "anon", @@ -8027,7 +8371,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' { "layout": { "layout": { - "name": "X_14", + "name": "X_15", "kind": "Ref" }, "kind": "Seq", @@ -8062,7 +8406,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' { "layout": { "layout": { - "name": "X_14", + "name": "X_15", "kind": "Ref" }, "kind": "Seq", @@ -8102,7 +8446,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' { "layout": { "layout": { - "name": "X_14", + "name": "X_15", "kind": "Ref" }, "kind": "Seq" @@ -8239,7 +8583,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_114", + "name": "X_115", "kind": "Ref" }, "kind": "anon", @@ -8288,7 +8632,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_114", + "name": "X_115", "kind": "Ref" }, "kind": "anon", @@ -8337,7 +8681,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_114", + "name": "X_115", "kind": "Ref" }, "kind": "anon", @@ -8386,7 +8730,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_114", + "name": "X_115", "kind": "Ref" }, "kind": "anon", @@ -8412,7 +8756,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "description": { - "title": "X_131" + "title": "X_132" }, "encoding": { "fields": [] @@ -8420,7 +8764,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "description": { - "title": "X_127" + "title": "X_128" }, "encoding": { "fields": [ @@ -8439,7 +8783,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "description": { - "title": "X_119" + "title": "X_120" }, "encoding": { "fields": [ @@ -8468,7 +8812,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "description": { - "title": "X_115" + "title": "X_116" }, "encoding": { "tag_size": "Uint8", @@ -8540,7 +8884,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "description": { - "title": "X_114" + "title": "X_115" }, "encoding": { "fields": [ @@ -8563,7 +8907,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "description": { - "title": "X_9" + "title": "X_10" }, "encoding": { "fields": [ @@ -8575,7 +8919,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' { "layout": { "layout": { - "name": "X_132", + "name": "X_133", "kind": "Ref" }, "kind": "Seq" @@ -8590,13 +8934,13 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "description": { - "title": "X_14" + "title": "X_15" }, "encoding": { "fields": [ { "layout": { - "name": "X_114", + "name": "X_115", "kind": "Ref" }, "kind": "anon", @@ -8606,7 +8950,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "layout": { - "name": "X_115", + "name": "X_116", "kind": "Ref" }, "kind": "anon", @@ -8620,7 +8964,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "description": { - "title": "X_8" + "title": "X_9" }, "encoding": { "fields": [ @@ -8636,7 +8980,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "kind": "named" }, { - "name": "withdrawals_merkle_root", + "name": "withdraw_list_hash", "layout": { "kind": "Bytes" }, @@ -8651,7 +8995,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "description": { - "title": "X_7" + "title": "X_8" }, "encoding": { "tag_size": "Uint8", @@ -8710,7 +9054,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' { "name": "deposit", "layout": { - "name": "X_5", + "name": "X_6", "kind": "Ref" }, "data_kind": { @@ -8726,7 +9070,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "description": { - "title": "X_5" + "title": "X_6" }, "encoding": { "fields": [ @@ -8767,7 +9111,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' { "name": "amount", "layout": { - "name": "X_6", + "name": "X_7", "kind": "Ref" }, "data_kind": { @@ -8780,7 +9124,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, { "description": { - "title": "X_6" + "title": "X_7" }, "encoding": { "tag_size": "Uint8", @@ -8907,6 +9251,80 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' ] } }, + { + "description": { + "title": "X_4" + }, + "encoding": { + "fields": [ + { + "kind": "dyn", + "num_fields": 1, + "size": "Uint30" + }, + { + "name": "contents", + "layout": { + "kind": "Bytes" + }, + "data_kind": { + "kind": "Variable" + }, + "kind": "named" + }, + { + "kind": "dyn", + "num_fields": 1, + "size": "Uint30" + }, + { + "name": "ty", + "layout": { + "kind": "Bytes" + }, + "data_kind": { + "kind": "Variable" + }, + "kind": "named" + }, + { + "name": "ticketer", + "layout": { + "name": "alpha.contract_id", + "kind": "Ref" + }, + "data_kind": { + "size": 22, + "kind": "Float" + }, + "kind": "named" + }, + { + "name": "amount", + "layout": { + "name": "X_7", + "kind": "Ref" + }, + "data_kind": { + "kind": "Dynamic" + }, + "kind": "named" + }, + { + "name": "claimer", + "layout": { + "name": "public_key_hash", + "kind": "Ref" + }, + "data_kind": { + "size": 21, + "kind": "Float" + }, + "kind": "named" + } + ] + } + }, { "description": { "title": "alpha.contract_id" @@ -9752,7 +10170,11 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "$ref": "#/definitions/unistring" }, "Message_result_hash": { - "title": "A message result (Base58Check-encoded)", + "title": "A message result hash (Base58Check-encoded)", + "$ref": "#/definitions/unistring" + }, + "Message_result_list_hash": { + "title": "A merklised message result list hash (Base58Check-encoded)", "$ref": "#/definitions/unistring" }, "Operation_hash": { @@ -9783,8 +10205,8 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "title": "The hash of a BLS public key used to identify a L2 ticket holders (Base58Check-encoded)", "$ref": "#/definitions/unistring" }, - "Withdrawal_list_hash": { - "title": "A merkle root hash for withdrawals (Base58Check-encoded)", + "Withdraw_list_hash": { + "title": "A list of withdraw orders (Base58Check-encoded)", "$ref": "#/definitions/unistring" }, "alpha.block_header.alpha.full_header": { @@ -11031,7 +11453,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "minimum": -2147483648, "maximum": 2147483647 }, - "batches": { + "messages": { "type": "array", "items": { "$ref": "#/definitions/Message_result_hash" @@ -11056,7 +11478,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "required": [ "inbox_merkle_root", "predecessor", - "batches", + "messages", "level" ], "additionalProperties": false @@ -11288,22 +11710,37 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "$ref": "#/definitions/Inbox_list_hash" } }, + "message_result_hash": { + "$ref": "#/definitions/Message_result_hash" + }, + "message_result_path": { + "type": "array", + "items": { + "$ref": "#/definitions/Message_result_list_hash" + } + }, "previous_message_result": { "type": "object", "properties": { "context_hash": { "$ref": "#/definitions/Context_hash" }, - "withdrawals_merkle_root": { - "$ref": "#/definitions/Withdrawal_list_hash" + "withdraw_list_hash": { + "$ref": "#/definitions/Withdraw_list_hash" } }, "required": [ - "withdrawals_merkle_root", + "withdraw_list_hash", "context_hash" ], "additionalProperties": false }, + "previous_message_result_path": { + "type": "array", + "items": { + "$ref": "#/definitions/Message_result_list_hash" + } + }, "proof": { "type": "object", "properties": { @@ -11589,7 +12026,10 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' }, "required": [ "proof", + "previous_message_result_path", "previous_message_result", + "message_result_path", + "message_result_hash", "message_path", "message_position", "message", @@ -11605,13 +12045,13 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "additionalProperties": false }, { - "title": "Tx_rollup_withdraw", + "title": "Tx_rollup_dispatch_tickets", "type": "object", "properties": { "kind": { "type": "string", "enum": [ - "tx_rollup_withdraw" + "tx_rollup_dispatch_tickets" ] }, "source": { @@ -11645,19 +12085,232 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "minimum": -1073741824, "maximum": 1073741823 }, - "withdrawals_merkle_root": { - "$ref": "#/definitions/Withdrawal_list_hash" + "message_result_path": { + "type": "array", + "items": { + "$ref": "#/definitions/Message_result_list_hash" + } }, - "withdraw_path": { + "tickets_info": { "type": "array", "items": { - "$ref": "#/definitions/Withdrawal_list_hash" + "type": "object", + "properties": { + "contents": { + "oneOf": [ + { + "title": "Int", + "type": "object", + "properties": { + "int": { + "$ref": "#/definitions/bignum" + } + }, + "required": [ + "int" + ], + "additionalProperties": false + }, + { + "title": "String", + "type": "object", + "properties": { + "string": { + "$ref": "#/definitions/unistring" + } + }, + "required": [ + "string" + ], + "additionalProperties": false + }, + { + "title": "Bytes", + "type": "object", + "properties": { + "bytes": { + "type": "string", + "pattern": "^([a-zA-Z0-9][a-zA-Z0-9])*$" + } + }, + "required": [ + "bytes" + ], + "additionalProperties": false + }, + { + "title": "Sequence", + "type": "array", + "items": { + "$ref": "#/definitions/micheline.alpha.michelson_v1.expression" + } + }, + { + "title": "Prim__generic", + "description": "Generic primitive (any number of args with or without annotations)", + "type": "object", + "properties": { + "prim": { + "$ref": "#/definitions/alpha.michelson.v1.primitives" + }, + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/micheline.alpha.michelson_v1.expression" + } + }, + "annots": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "prim" + ], + "additionalProperties": false + } + ] + }, + "ty": { + "oneOf": [ + { + "title": "Int", + "type": "object", + "properties": { + "int": { + "$ref": "#/definitions/bignum" + } + }, + "required": [ + "int" + ], + "additionalProperties": false + }, + { + "title": "String", + "type": "object", + "properties": { + "string": { + "$ref": "#/definitions/unistring" + } + }, + "required": [ + "string" + ], + "additionalProperties": false + }, + { + "title": "Bytes", + "type": "object", + "properties": { + "bytes": { + "type": "string", + "pattern": "^([a-zA-Z0-9][a-zA-Z0-9])*$" + } + }, + "required": [ + "bytes" + ], + "additionalProperties": false + }, + { + "title": "Sequence", + "type": "array", + "items": { + "$ref": "#/definitions/micheline.alpha.michelson_v1.expression" + } + }, + { + "title": "Prim__generic", + "description": "Generic primitive (any number of args with or without annotations)", + "type": "object", + "properties": { + "prim": { + "$ref": "#/definitions/alpha.michelson.v1.primitives" + }, + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/micheline.alpha.michelson_v1.expression" + } + }, + "annots": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "prim" + ], + "additionalProperties": false + } + ] + }, + "ticketer": { + "$ref": "#/definitions/alpha.contract_id" + }, + "amount": { + "$ref": "#/definitions/int64" + }, + "claimer": { + "$ref": "#/definitions/Signature.Public_key_hash" + } + }, + "required": [ + "claimer", + "amount", + "ticketer", + "ty", + "contents" + ], + "additionalProperties": false } + } + }, + "required": [ + "tickets_info", + "message_result_path", + "message_index", + "context_hash", + "level", + "tx_rollup", + "storage_limit", + "gas_limit", + "counter", + "fee", + "source", + "kind" + ], + "additionalProperties": false + }, + { + "title": "Transfer_ticket", + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "transfer_ticket" + ] }, - "withdraw_position": { - "type": "integer", - "minimum": -1073741824, - "maximum": 1073741823 + "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" }, "ticket_contents": { "oneOf": [ @@ -11817,7 +12470,7 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "$ref": "#/definitions/alpha.contract_id" }, "ticket_amount": { - "$ref": "#/definitions/int64" + "$ref": "#/definitions/positive_bignum" }, "destination": { "$ref": "#/definitions/alpha.contract_id" @@ -11833,13 +12486,6 @@ curl -s 'http://localhost:[PORT]/describe/chains/main/mempool?recurse=yes' "ticket_ticketer", "ticket_ty", "ticket_contents", - "withdraw_position", - "withdraw_path", - "withdrawals_merkle_root", - "message_index", - "context_hash", - "level", - "tx_rollup", "storage_limit", "gas_limit", "counter", diff --git a/tezt/_regressions/rpc/alpha.proxy.others.out b/tezt/_regressions/rpc/alpha.proxy.others.out index 259ead419c38..0914a69096a4 100644 --- a/tezt/_regressions/rpc/alpha.proxy.others.out +++ b/tezt/_regressions/rpc/alpha.proxy.others.out @@ -32,14 +32,14 @@ rpc/alpha.proxy.others.out "tx_rollup_enable": true, "tx_rollup_origination_size": 60000, "tx_rollup_hard_size_limit_per_inbox": 100000, "tx_rollup_hard_size_limit_per_message": 5000, - "tx_rollup_max_withdrawals_per_batch": 255, + "tx_rollup_max_withdrawals_per_batch": 15, "tx_rollup_commitment_bond": "10000000000", "tx_rollup_finality_period": 60000, "tx_rollup_withdraw_period": 60000, "tx_rollup_max_inboxes_count": 60100, "tx_rollup_max_messages_per_inbox": 1010, "tx_rollup_max_commitments_count": 120100, "tx_rollup_cost_per_byte_ema_factor": 120, - "tx_rollup_max_ticket_payload_size": 10240, + "tx_rollup_max_ticket_payload_size": 2048, "tx_rollup_rejection_max_proof_size": 30000, "sc_rollup_enable": false, "sc_rollup_origination_size": 6314, "sc_rollup_challenge_window_in_blocks": 20160, diff --git a/tezt/_regressions/rpc/alpha.proxy_server_data_dir.others.out b/tezt/_regressions/rpc/alpha.proxy_server_data_dir.others.out index 3e48ceabff70..fd4b717dcf42 100644 --- a/tezt/_regressions/rpc/alpha.proxy_server_data_dir.others.out +++ b/tezt/_regressions/rpc/alpha.proxy_server_data_dir.others.out @@ -32,14 +32,14 @@ rpc/alpha.proxy_server_data_dir.others.out "tx_rollup_enable": true, "tx_rollup_origination_size": 60000, "tx_rollup_hard_size_limit_per_inbox": 100000, "tx_rollup_hard_size_limit_per_message": 5000, - "tx_rollup_max_withdrawals_per_batch": 255, + "tx_rollup_max_withdrawals_per_batch": 15, "tx_rollup_commitment_bond": "10000000000", "tx_rollup_finality_period": 60000, "tx_rollup_withdraw_period": 60000, "tx_rollup_max_inboxes_count": 60100, "tx_rollup_max_messages_per_inbox": 1010, "tx_rollup_max_commitments_count": 120100, "tx_rollup_cost_per_byte_ema_factor": 120, - "tx_rollup_max_ticket_payload_size": 10240, + "tx_rollup_max_ticket_payload_size": 2048, "tx_rollup_rejection_max_proof_size": 30000, "sc_rollup_enable": false, "sc_rollup_origination_size": 6314, "sc_rollup_challenge_window_in_blocks": 20160, diff --git a/tezt/_regressions/rpc/alpha.proxy_server_rpc.others.out b/tezt/_regressions/rpc/alpha.proxy_server_rpc.others.out index 12d6c6c6f300..b396ce9cfabe 100644 --- a/tezt/_regressions/rpc/alpha.proxy_server_rpc.others.out +++ b/tezt/_regressions/rpc/alpha.proxy_server_rpc.others.out @@ -32,14 +32,14 @@ rpc/alpha.proxy_server_rpc.others.out "tx_rollup_enable": true, "tx_rollup_origination_size": 60000, "tx_rollup_hard_size_limit_per_inbox": 100000, "tx_rollup_hard_size_limit_per_message": 5000, - "tx_rollup_max_withdrawals_per_batch": 255, + "tx_rollup_max_withdrawals_per_batch": 15, "tx_rollup_commitment_bond": "10000000000", "tx_rollup_finality_period": 60000, "tx_rollup_withdraw_period": 60000, "tx_rollup_max_inboxes_count": 60100, "tx_rollup_max_messages_per_inbox": 1010, "tx_rollup_max_commitments_count": 120100, "tx_rollup_cost_per_byte_ema_factor": 120, - "tx_rollup_max_ticket_payload_size": 10240, + "tx_rollup_max_ticket_payload_size": 2048, "tx_rollup_rejection_max_proof_size": 30000, "sc_rollup_enable": false, "sc_rollup_origination_size": 6314, "sc_rollup_challenge_window_in_blocks": 20160, diff --git a/tezt/_regressions/tx_rollup_rpc_commitment.out b/tezt/_regressions/tx_rollup_rpc_commitment.out index b5b595dfd37c..7409f94035cc 100644 --- a/tezt/_regressions/tx_rollup_rpc_commitment.out +++ b/tezt/_regressions/tx_rollup_rpc_commitment.out @@ -90,7 +90,7 @@ This sequence of operations was run: { "level": 0, "messages": { "count": 1, - "root": "txM36Kjo7cRtSCREhUPJCSnC2CahmR15sif2bW8qTjTq8GHenH89v", + "root": "[TX_ROLLUP_MESSAGE_RESULT_LIST_HASH]", "last_message_result_hash": "[TX_ROLLUP_MESSAGE_RESULT_HASH]" }, "predecessor": null, diff --git a/tezt/lib_tezos/tezos_regression.ml b/tezt/lib_tezos/tezos_regression.ml index 37f609c9156e..4cd78546a745 100644 --- a/tezt/lib_tezos/tezos_regression.ml +++ b/tezt/lib_tezos/tezos_regression.ml @@ -36,6 +36,7 @@ let hooks = ("txmr\\w{50}\\b", "[TX_ROLLUP_MESSAGE_RESULT_HASH]"); ("txm\\w{50}\\b", "[TX_ROLLUP_MESSAGE_HASH]"); ("txmr\\w{50}\\b", "[TX_ROLLUP_MESSAGE_RESULT_HASH]"); + ("txM\\w{50}\\b", "[TX_ROLLUP_MESSAGE_RESULT_LIST_HASH]"); ("txc\\w{50}\\b", "[TX_ROLLUP_COMMITMENT_HASH]"); ("scr1\\w{33}\\b", "[SC_ROLLUP_HASH]"); ("scc1\\w{50}\\b", "[SC_ROLLUP_COMMITMENT_HASH]"); -- GitLab