From 3c1a8cd2533550b791d36b6ef080acc974017bcb Mon Sep 17 00:00:00 2001 From: Valentin Chaboche Date: Wed, 15 Feb 2023 11:36:42 +0100 Subject: [PATCH] Proto/TORU: remove manager operations --- src/proto_alpha/lib_client/injection.ml | 69 +-- .../lib_client/operation_result.ml | 150 ----- .../lib_protocol/alpha_context.mli | 113 ---- src/proto_alpha/lib_protocol/apply.ml | 353 ----------- src/proto_alpha/lib_protocol/apply_results.ml | 578 ------------------ .../lib_protocol/apply_results.mli | 45 -- .../lib_protocol/operation_repr.ml | 404 +----------- .../lib_protocol/operation_repr.mli | 137 +---- .../lib_protocol/test/helpers/block.ml | 22 +- .../test/integration/validate/test_sanity.ml | 10 +- src/proto_alpha/lib_protocol/validate.ml | 98 --- src/proto_alpha/lib_sc_rollup_node/daemon.ml | 5 +- 12 files changed, 52 insertions(+), 1932 deletions(-) diff --git a/src/proto_alpha/lib_client/injection.ml b/src/proto_alpha/lib_client/injection.ml index 2ca5ae72f48e..6fd4c13dd4b7 100644 --- a/src/proto_alpha/lib_client/injection.ml +++ b/src/proto_alpha/lib_client/injection.ml @@ -326,14 +326,6 @@ let estimated_gas_single (type kind) | Set_deposits_limit_result {consumed_gas} | Update_consensus_key_result {consumed_gas; _} | Increase_paid_storage_result {consumed_gas; _} - | Tx_rollup_origination_result {consumed_gas; _} - | Tx_rollup_submit_batch_result {consumed_gas; _} - | Tx_rollup_commit_result {consumed_gas; _} - | Tx_rollup_return_bond_result {consumed_gas; _} - | Tx_rollup_finalize_commitment_result {consumed_gas; _} - | Tx_rollup_remove_commitment_result {consumed_gas; _} - | Tx_rollup_rejection_result {consumed_gas; _} - | Tx_rollup_dispatch_tickets_result {consumed_gas; _} | Transfer_ticket_result {consumed_gas; _} | Dal_publish_slot_header_result {consumed_gas; _} | Sc_rollup_originate_result {consumed_gas; _} @@ -379,8 +371,7 @@ let estimated_gas_single (type kind) gas internal_operation_results -let estimated_storage_single (type kind) ~tx_rollup_origination_size - ~origination_size +let estimated_storage_single (type kind) ~origination_size (Manager_operation_result {operation_result; internal_operation_results; _} : kind Kind.manager contents_result) = let storage_size_diff (type kind) (result : kind manager_operation_result) = @@ -398,10 +389,7 @@ let estimated_storage_single (type kind) ~tx_rollup_origination_size | Register_global_constant_result {size_of_constant; _} -> Ok size_of_constant | Update_consensus_key_result _ -> Ok Z.zero - | Tx_rollup_origination_result _ -> Ok tx_rollup_origination_size - | Tx_rollup_submit_batch_result {paid_storage_size_diff; _} | Sc_rollup_execute_outbox_message_result {paid_storage_size_diff; _} - | Tx_rollup_dispatch_tickets_result {paid_storage_size_diff; _} | Transfer_ticket_result {paid_storage_size_diff; _} | Zk_rollup_publish_result {paid_storage_size_diff; _} | Zk_rollup_update_result {paid_storage_size_diff; _} @@ -418,11 +406,8 @@ let estimated_storage_single (type kind) ~tx_rollup_origination_size Ok Z.zero | Transaction_result (Transaction_to_sc_rollup_result _) | Reveal_result _ | Delegation_result _ | Set_deposits_limit_result _ - | Increase_paid_storage_result _ | Tx_rollup_commit_result _ - | Tx_rollup_return_bond_result _ - | Tx_rollup_finalize_commitment_result _ - | Tx_rollup_remove_commitment_result _ | Tx_rollup_rejection_result _ - | Dal_publish_slot_header_result _ | Sc_rollup_add_messages_result _ + | Increase_paid_storage_result _ | Dal_publish_slot_header_result _ + | Sc_rollup_add_messages_result _ (* The following Sc_rollup operations have zero storage cost because we consider them to be paid in the stake deposit. @@ -475,21 +460,14 @@ let estimated_storage_single (type kind) ~tx_rollup_origination_size storage internal_operation_results -let estimated_storage ~tx_rollup_origination_size ~origination_size res = +let estimated_storage ~origination_size res = let rec estimated_storage : type kind. kind contents_result_list -> _ = function | Single_result (Manager_operation_result _ as res) -> - estimated_storage_single - ~tx_rollup_origination_size - ~origination_size - res + estimated_storage_single ~origination_size res | Single_result _ -> Ok Z.zero | Cons_result (res, rest) -> - estimated_storage_single - ~tx_rollup_origination_size - ~origination_size - res - >>? fun storage1 -> + estimated_storage_single ~origination_size res >>? fun storage1 -> estimated_storage rest >>? fun storage2 -> Ok (Z.add storage1 storage2) in estimated_storage res >>? fun diff -> Ok (Z.max Z.zero diff) @@ -513,15 +491,11 @@ let originated_contracts_single (type kind) | Register_global_constant_result _ | Reveal_result _ | Delegation_result _ | Set_deposits_limit_result _ | Update_consensus_key_result _ | Increase_paid_storage_result _ - | Tx_rollup_origination_result _ | Tx_rollup_submit_batch_result _ - | Tx_rollup_commit_result _ | Tx_rollup_return_bond_result _ - | Tx_rollup_finalize_commitment_result _ - | Tx_rollup_remove_commitment_result _ | Tx_rollup_rejection_result _ - | Tx_rollup_dispatch_tickets_result _ | Transfer_ticket_result _ - | Dal_publish_slot_header_result _ | Sc_rollup_originate_result _ - | Sc_rollup_add_messages_result _ | Sc_rollup_cement_result _ - | Sc_rollup_publish_result _ | Sc_rollup_refute_result _ - | Sc_rollup_timeout_result _ | Sc_rollup_execute_outbox_message_result _ + | Transfer_ticket_result _ | Dal_publish_slot_header_result _ + | Sc_rollup_originate_result _ | Sc_rollup_add_messages_result _ + | Sc_rollup_cement_result _ | Sc_rollup_publish_result _ + | Sc_rollup_refute_result _ | Sc_rollup_timeout_result _ + | Sc_rollup_execute_outbox_message_result _ | Sc_rollup_recover_bond_result _ | Zk_rollup_origination_result _ | Zk_rollup_publish_result _ | Zk_rollup_update_result _ -> Ok []) @@ -568,22 +542,13 @@ let rec originated_contracts : type kind. kind contents_result_list -> _ = originated_contracts rest >>? fun contracts2 -> Ok (List.rev_append contracts1 contracts2) -let estimated_storage_single ~force ~tx_rollup_origination_size - ~origination_size result = - match - estimated_storage_single - ~tx_rollup_origination_size - ~origination_size - result - with +let estimated_storage_single ~force ~origination_size result = + match estimated_storage_single ~origination_size result with | Error _ when force -> Ok Z.zero | res -> res -let estimated_storage ~force ~tx_rollup_origination_size ~origination_size - result = - match - estimated_storage ~tx_rollup_origination_size ~origination_size result - with +let estimated_storage ~force ~origination_size result = + match estimated_storage ~origination_size result with | Error _ when force -> Ok Z.zero | res -> res @@ -680,7 +645,7 @@ let may_patch_limits (type kind) (cctxt : #Protocol_client_context.full) hard_gas_limit_per_block; hard_storage_limit_per_operation; origination_size; - tx_rollup = {origination_size = tx_rollup_origination_size; _}; + tx_rollup = {origination_size = _tx_rollup_origination_size; _}; cost_per_byte; _; }; @@ -891,7 +856,6 @@ let may_patch_limits (type kind) (cctxt : #Protocol_client_context.full) (if user_storage_limit_needs_patching c.storage_limit then Lwt.return (estimated_storage_single - ~tx_rollup_origination_size:(Z.of_int tx_rollup_origination_size) ~origination_size:(Z.of_int origination_size) ~force result) @@ -983,7 +947,6 @@ let may_patch_limits (type kind) (cctxt : #Protocol_client_context.full) >>=? fun () -> ( Lwt.return (estimated_storage - ~tx_rollup_origination_size:(Z.of_int tx_rollup_origination_size) ~origination_size:(Z.of_int origination_size) ~force result.contents) diff --git a/src/proto_alpha/lib_client/operation_result.ml b/src/proto_alpha/lib_client/operation_result.ml index fa879aaf834f..dcf4efccd306 100644 --- a/src/proto_alpha/lib_client/operation_result.ml +++ b/src/proto_alpha/lib_client/operation_result.ml @@ -215,79 +215,6 @@ let pp_manager_operation_content (type kind) source ppf "Update_consensus_key:@,Public key hash: %a" Signature.Public_key_hash.pp (Signature.Public_key.hash pk) - | Tx_rollup_origination -> - Format.fprintf - ppf - "Transaction rollup origination:@,From: %a" - Contract.pp - source - | Tx_rollup_submit_batch {tx_rollup; content; burn_limit = _} -> - Format.fprintf - ppf - "Transaction rollup transaction:@,\ - Address:%a@,\ - Message length: %d bytes@,\ - From: %a" - Tx_rollup.pp - tx_rollup - (String.length content) - Contract.pp - source - | Tx_rollup_commit {tx_rollup; commitment} -> - Format.fprintf - ppf - "Transaction rollup commitment:@,\ - Address: %a@,\ - @[Commitment:@,\ - %a@]@,\ - From: %a" - Tx_rollup.pp - tx_rollup - Tx_rollup_commitment.Full.pp - commitment - Contract.pp - source - | Tx_rollup_return_bond {tx_rollup} -> - Format.fprintf - ppf - "Transaction rollup recover commitment bond:@,Address: %a@,From: %a" - Tx_rollup.pp - tx_rollup - Contract.pp - source - | Tx_rollup_finalize_commitment {tx_rollup} -> - Format.fprintf - ppf - "Transaction rollup finalize commitment:@,Address: %a@,From: %a" - Tx_rollup.pp - tx_rollup - Contract.pp - source - | Tx_rollup_remove_commitment {tx_rollup; _} -> - Format.fprintf - ppf - "Transaction rollup remove commitment:@,Address: %a@,From: %a" - Tx_rollup.pp - tx_rollup - Contract.pp - source - | Tx_rollup_rejection {tx_rollup; _} -> - (* FIXME/TORU *) - Format.fprintf - ppf - "Transaction rollup rejection:@,Address: %a@,From: %a" - Tx_rollup.pp - tx_rollup - Contract.pp - source - | Tx_rollup_dispatch_tickets {tx_rollup; _} -> - Format.fprintf - ppf - "Transaction rollup dispatch tickets:@,Address: %a@,From: %a" - Tx_rollup.pp - tx_rollup - Contract.pp - source | Transfer_ticket {contents; ty; ticketer; amount; destination; entrypoint} -> Format.fprintf ppf @@ -678,60 +605,6 @@ let pp_manager_operation_contents_result ppf op_result = pp_balance_updates ppf balance_updates ; pp_consumed_gas ppf consumed_gas in - let pp_tx_rollup_origination_result - (Tx_rollup_origination_result - {balance_updates; consumed_gas; originated_tx_rollup}) = - pp_balance_updates ppf balance_updates ; - pp_consumed_gas ppf consumed_gas ; - Format.fprintf - ppf - "@,Originated tx rollup: %a" - Tx_rollup.pp - originated_tx_rollup - in - let pp_tx_rollup_submit_batch_result - (Tx_rollup_submit_batch_result - {balance_updates; consumed_gas; paid_storage_size_diff}) = - pp_balance_updates ppf balance_updates ; - pp_consumed_gas ppf consumed_gas ; - pp_paid_storage_size_diff ppf paid_storage_size_diff - in - let pp_tx_rollup_commit_result - (Tx_rollup_commit_result {balance_updates; consumed_gas}) = - pp_balance_updates ppf balance_updates ; - pp_consumed_gas ppf consumed_gas - in - let pp_tx_rollup_return_bond_result - (Tx_rollup_return_bond_result {balance_updates; consumed_gas}) = - pp_balance_updates ppf balance_updates ; - pp_consumed_gas ppf consumed_gas - in - let pp_tx_rollup_finalize_commitment_result - (Tx_rollup_finalize_commitment_result - {balance_updates; consumed_gas; level}) = - pp_balance_updates ppf balance_updates ; - pp_consumed_gas ppf consumed_gas ; - Format.fprintf ppf "@finalized level:@, %a" Tx_rollup_level.pp level - in - let pp_tx_rollup_remove_commitment_result - (Tx_rollup_remove_commitment_result - {balance_updates; consumed_gas; level}) = - pp_balance_updates ppf balance_updates ; - pp_consumed_gas ppf consumed_gas ; - Format.fprintf ppf "@finalized level:@, %a" Tx_rollup_level.pp level - in - let pp_tx_rollup_rejection_result - (Tx_rollup_rejection_result {balance_updates; consumed_gas}) = - pp_balance_updates ppf balance_updates ; - pp_consumed_gas ppf consumed_gas - in - let pp_tx_rollup_dispatch_tickets_result - (Tx_rollup_dispatch_tickets_result - {balance_updates; consumed_gas; paid_storage_size_diff}) = - pp_paid_storage_size_diff ppf paid_storage_size_diff ; - pp_consumed_gas ppf consumed_gas ; - pp_balance_updates ppf balance_updates - in let pp_transfer_ticket_result (Transfer_ticket_result {balance_updates; ticket_receipt; consumed_gas; paid_storage_size_diff}) @@ -853,17 +726,6 @@ let pp_manager_operation_contents_result ppf op_result = | Set_deposits_limit_result _ -> "deposits limit modification" | Update_consensus_key_result _ -> "consensus key update" | Increase_paid_storage_result _ -> "paid storage increase" - | Tx_rollup_origination_result _ -> "transaction rollup origination" - | Tx_rollup_submit_batch_result _ -> "transaction rollup batch submission" - | Tx_rollup_commit_result _ -> "transaction rollup commitment" - | Tx_rollup_return_bond_result _ -> "transaction rollup bond retrieval" - | Tx_rollup_finalize_commitment_result _ -> - "transaction rollup commitment finalization" - | Tx_rollup_remove_commitment_result _ -> - "transaction rollup commitment removal" - | Tx_rollup_rejection_result _ -> "transaction rollup commitment rejection" - | Tx_rollup_dispatch_tickets_result _ -> - "transaction rollup tickets dispatch" | Transfer_ticket_result _ -> "tickets transfer" | Sc_rollup_originate_result _ -> "smart rollup origination" | Sc_rollup_add_messages_result _ -> "smart rollup messages submission" @@ -894,18 +756,6 @@ let pp_manager_operation_contents_result ppf op_result = | Register_global_constant_result _ as op -> pp_register_global_constant_result op | Increase_paid_storage_result _ as op -> pp_increase_paid_storage_result op - | Tx_rollup_origination_result _ as op -> pp_tx_rollup_origination_result op - | Tx_rollup_submit_batch_result _ as op -> - pp_tx_rollup_submit_batch_result op - | Tx_rollup_commit_result _ as op -> pp_tx_rollup_commit_result op - | Tx_rollup_return_bond_result _ as op -> pp_tx_rollup_return_bond_result op - | Tx_rollup_finalize_commitment_result _ as op -> - pp_tx_rollup_finalize_commitment_result op - | Tx_rollup_remove_commitment_result _ as op -> - pp_tx_rollup_remove_commitment_result op - | Tx_rollup_rejection_result _ as op -> pp_tx_rollup_rejection_result op - | Tx_rollup_dispatch_tickets_result _ as op -> - pp_tx_rollup_dispatch_tickets_result op | Transfer_ticket_result _ as op -> pp_transfer_ticket_result op | Sc_rollup_originate_result _ as op -> pp_sc_rollup_originate_result op | Sc_rollup_add_messages_result _ as op -> diff --git a/src/proto_alpha/lib_protocol/alpha_context.mli b/src/proto_alpha/lib_protocol/alpha_context.mli index b280770604c1..0ba07430157c 100644 --- a/src/proto_alpha/lib_protocol/alpha_context.mli +++ b/src/proto_alpha/lib_protocol/alpha_context.mli @@ -4530,22 +4530,6 @@ module Kind : sig type register_global_constant = Register_global_constant_kind - type tx_rollup_origination = Tx_rollup_origination_kind - - type tx_rollup_submit_batch = Tx_rollup_submit_batch_kind - - type tx_rollup_commit = Tx_rollup_commit_kind - - type tx_rollup_return_bond = Tx_rollup_return_bond_kind - - type tx_rollup_finalize_commitment = Tx_rollup_finalize_commitment_kind - - type tx_rollup_remove_commitment = Tx_rollup_remove_commitment_kind - - type tx_rollup_rejection = Tx_rollup_rejection_kind - - type tx_rollup_dispatch_tickets = Tx_rollup_dispatch_tickets_kind - type transfer_ticket = Transfer_ticket_kind type dal_publish_slot_header = Dal_publish_slot_header_kind @@ -4583,17 +4567,6 @@ module Kind : sig | Set_deposits_limit_manager_kind : set_deposits_limit manager | Increase_paid_storage_manager_kind : increase_paid_storage manager | Update_consensus_key_manager_kind : update_consensus_key manager - | Tx_rollup_origination_manager_kind : tx_rollup_origination manager - | Tx_rollup_submit_batch_manager_kind : tx_rollup_submit_batch manager - | Tx_rollup_commit_manager_kind : tx_rollup_commit manager - | Tx_rollup_return_bond_manager_kind : tx_rollup_return_bond manager - | Tx_rollup_finalize_commitment_manager_kind - : tx_rollup_finalize_commitment manager - | Tx_rollup_remove_commitment_manager_kind - : tx_rollup_remove_commitment manager - | Tx_rollup_rejection_manager_kind : tx_rollup_rejection manager - | Tx_rollup_dispatch_tickets_manager_kind - : tx_rollup_dispatch_tickets manager | Transfer_ticket_manager_kind : transfer_ticket manager | Dal_publish_slot_header_manager_kind : dal_publish_slot_header manager | Sc_rollup_originate_manager_kind : sc_rollup_originate manager @@ -4743,52 +4716,6 @@ and _ manager_operation = | Update_consensus_key : Signature.Public_key.t -> Kind.update_consensus_key manager_operation - | Tx_rollup_origination : Kind.tx_rollup_origination manager_operation - | Tx_rollup_submit_batch : { - tx_rollup : Tx_rollup.t; - content : string; - burn_limit : Tez.tez option; - } - -> Kind.tx_rollup_submit_batch manager_operation - | Tx_rollup_commit : { - tx_rollup : Tx_rollup.t; - commitment : Tx_rollup_commitment.Full.t; - } - -> Kind.tx_rollup_commit manager_operation - | Tx_rollup_return_bond : { - tx_rollup : Tx_rollup.t; - } - -> Kind.tx_rollup_return_bond manager_operation - | Tx_rollup_finalize_commitment : { - tx_rollup : Tx_rollup.t; - } - -> Kind.tx_rollup_finalize_commitment manager_operation - | Tx_rollup_remove_commitment : { - tx_rollup : Tx_rollup.t; - } - -> Kind.tx_rollup_remove_commitment manager_operation - | Tx_rollup_rejection : { - tx_rollup : Tx_rollup.t; - level : Tx_rollup_level.t; - message : 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.serialized; - } - -> Kind.tx_rollup_rejection manager_operation - | Tx_rollup_dispatch_tickets : { - tx_rollup : Tx_rollup.t; - 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 | Transfer_ticket : { contents : Script.lazy_expr; ty : Script.lazy_expr; @@ -4999,28 +4926,6 @@ module Operation : sig val update_consensus_key_case : Kind.update_consensus_key Kind.manager case - val tx_rollup_origination_case : - Kind.tx_rollup_origination Kind.manager case - - val tx_rollup_submit_batch_case : - Kind.tx_rollup_submit_batch Kind.manager case - - val tx_rollup_commit_case : Kind.tx_rollup_commit Kind.manager case - - val tx_rollup_return_bond_case : - Kind.tx_rollup_return_bond Kind.manager case - - val tx_rollup_finalize_commitment_case : - Kind.tx_rollup_finalize_commitment Kind.manager case - - val tx_rollup_remove_commitment_case : - Kind.tx_rollup_remove_commitment Kind.manager case - - val tx_rollup_rejection_case : Kind.tx_rollup_rejection Kind.manager case - - val tx_rollup_dispatch_tickets_case : - Kind.tx_rollup_dispatch_tickets Kind.manager case - val transfer_ticket_case : Kind.transfer_ticket Kind.manager case val dal_publish_slot_header_case : @@ -5090,24 +4995,6 @@ module Operation : sig val increase_paid_storage_case : Kind.increase_paid_storage case - val tx_rollup_origination_case : Kind.tx_rollup_origination case - - val tx_rollup_submit_batch_case : Kind.tx_rollup_submit_batch case - - val tx_rollup_commit_case : Kind.tx_rollup_commit case - - val tx_rollup_return_bond_case : Kind.tx_rollup_return_bond case - - val tx_rollup_finalize_commitment_case : - Kind.tx_rollup_finalize_commitment case - - val tx_rollup_remove_commitment_case : - Kind.tx_rollup_remove_commitment case - - val tx_rollup_rejection_case : Kind.tx_rollup_rejection case - - val tx_rollup_dispatch_tickets_case : Kind.tx_rollup_dispatch_tickets case - val transfer_ticket_case : Kind.transfer_ticket case val dal_publish_slot_header_case : Kind.dal_publish_slot_header case diff --git a/src/proto_alpha/lib_protocol/apply.ml b/src/proto_alpha/lib_protocol/apply.ml index 7c281963f85e..e903c316640c 100644 --- a/src/proto_alpha/lib_protocol/apply.ml +++ b/src/proto_alpha/lib_protocol/apply.ml @@ -908,103 +908,6 @@ let apply_manager_operation : ~internal:false ~parameter:(Untyped_arg parameters) >|=? fun (ctxt, res, ops) -> (ctxt, Transaction_result res, ops) - | Tx_rollup_dispatch_tickets - { - 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) -> - 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} -> - error_when - Tx_rollup_l2_qty.(amount <= zero) - Script_tc_errors.Forbidden_zero_ticket_quantity - >>?= fun () -> - Ticket_transfer.parse_ticket - ~consume_deserialization_gas - ~ticketer - ~contents - ~ty - ctxt - >>=? fun (ctxt, ticket_token) -> - Ticket_balance_key.of_ex_token - ctxt - ~owner:(Tx_rollup tx_rollup) - ticket_token - >>=? fun (ticket_hash, ctxt) -> - let withdrawal = Tx_rollup_withdraw.{claimer; ticket_hash; amount} in - return - (withdrawal :: acc_withdraw, (withdrawal, ticket_token) :: acc, ctxt)) - ([], [], ctxt) - tickets_info - >>=? fun (rev_withdraw_list, rev_ex_token_and_hash_list, ctxt) -> - 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 ctxt -> - Tx_rollup_reveal.record - ctxt - tx_rollup - level - ~message_position:message_index - >>=? fun ctxt -> - let adjust_ticket_balance (ctxt, acc_diff) - ( Tx_rollup_withdraw. - {claimer; amount; ticket_hash = tx_rollup_ticket_hash}, - ticket_token ) = - Tx_rollup_l2_qty.to_z amount - |> Ticket_amount.of_zint - |> Option.value_e - ~error: - (Error_monad.trace_of_error - Script_tc_errors.Forbidden_zero_ticket_quantity) - >>?= fun amount -> - Ticket_balance_key.of_ex_token - ctxt - ~owner:(Contract (Contract.Implicit claimer)) - ticket_token - >>=? fun (claimer_ticket_hash, ctxt) -> - Ticket_transfer.transfer_ticket_with_hashes - ctxt - ~src_hash:tx_rollup_ticket_hash - ~dst_hash:claimer_ticket_hash - amount - >>=? fun (ctxt, diff) -> return (ctxt, Z.(add acc_diff diff)) - in - List.fold_left_es - adjust_ticket_balance - (ctxt, Z.zero) - rev_ex_token_and_hash_list - >>=? fun (ctxt, paid_storage_size_diff) -> - let result = - Tx_rollup_dispatch_tickets_result - { - balance_updates = []; - consumed_gas = Gas.consumed ~since:ctxt_before_op ~until:ctxt; - paid_storage_size_diff; - } - in - return (ctxt, result, []) | Transfer_ticket {contents; ty; ticketer; amount; destination; entrypoint} -> ( match destination with @@ -1237,235 +1140,6 @@ let apply_manager_operation : Update_consensus_key_result {consumed_gas = Gas.consumed ~since:ctxt_before_op ~until:ctxt}, [] ) - | Tx_rollup_origination -> - Tx_rollup.originate ctxt >>=? fun (ctxt, originated_tx_rollup) -> - let result = - Tx_rollup_origination_result - { - consumed_gas = Gas.consumed ~since:ctxt_before_op ~until:ctxt; - originated_tx_rollup; - balance_updates = []; - } - in - return (ctxt, result, []) - | Tx_rollup_submit_batch {tx_rollup; content; burn_limit} -> - let message, message_size = Tx_rollup_message.make_batch content in - Tx_rollup_gas.hash_cost message_size >>?= fun cost -> - Gas.consume ctxt cost >>?= fun ctxt -> - Tx_rollup_state.get ctxt tx_rollup >>=? fun (ctxt, state) -> - Tx_rollup_inbox.append_message ctxt tx_rollup state message - >>=? fun (ctxt, state, paid_storage_size_diff) -> - Tx_rollup_state.burn_cost ~limit:burn_limit state message_size - >>?= fun cost -> - Token.transfer ctxt (`Contract source_contract) `Burned cost - >>=? fun (ctxt, balance_updates) -> - Tx_rollup_state.update ctxt tx_rollup state >>=? fun ctxt -> - let result = - Tx_rollup_submit_batch_result - { - consumed_gas = Gas.consumed ~since:ctxt_before_op ~until:ctxt; - balance_updates; - paid_storage_size_diff; - } - in - return (ctxt, result, []) - | Tx_rollup_commit {tx_rollup; commitment} -> - Tx_rollup_state.get ctxt tx_rollup >>=? fun (ctxt, state) -> - ( Tx_rollup_commitment.has_bond ctxt tx_rollup source - >>=? fun (ctxt, pending) -> - if not pending then - let bond_id = Bond_id.Tx_rollup_bond_id tx_rollup in - Token.transfer - ctxt - (`Contract source_contract) - (`Frozen_bonds (source_contract, bond_id)) - (Constants.tx_rollup_commitment_bond ctxt) - else return (ctxt, []) ) - >>=? fun (ctxt, balance_updates) -> - Tx_rollup_commitment.add_commitment ctxt tx_rollup state source commitment - >>=? fun (ctxt, state, to_slash) -> - (match to_slash with - | Some pkh -> - let committer = Contract.Implicit pkh in - Tx_rollup_commitment.slash_bond ctxt tx_rollup pkh - >>=? fun (ctxt, slashed) -> - if slashed then - let bid = Bond_id.Tx_rollup_bond_id tx_rollup in - Token.balance ctxt (`Frozen_bonds (committer, bid)) - >>=? fun (ctxt, burn) -> - Token.transfer - ctxt - (`Frozen_bonds (committer, bid)) - `Tx_rollup_rejection_punishments - burn - else return (ctxt, []) - | None -> return (ctxt, [])) - >>=? fun (ctxt, burn_update) -> - Tx_rollup_state.update ctxt tx_rollup state >>=? fun ctxt -> - let result = - Tx_rollup_commit_result - { - consumed_gas = Gas.consumed ~since:ctxt_before_op ~until:ctxt; - balance_updates = burn_update @ balance_updates; - } - in - return (ctxt, result, []) - | Tx_rollup_return_bond {tx_rollup} -> - Tx_rollup_commitment.remove_bond ctxt tx_rollup source >>=? fun ctxt -> - let bond_id = Bond_id.Tx_rollup_bond_id tx_rollup in - Token.balance ctxt (`Frozen_bonds (source_contract, bond_id)) - >>=? fun (ctxt, bond) -> - Token.transfer - ctxt - (`Frozen_bonds (source_contract, bond_id)) - (`Contract source_contract) - bond - >>=? fun (ctxt, balance_updates) -> - let result = - Tx_rollup_return_bond_result - { - consumed_gas = Gas.consumed ~since:ctxt_before_op ~until:ctxt; - balance_updates; - } - in - return (ctxt, result, []) - | Tx_rollup_finalize_commitment {tx_rollup} -> - Tx_rollup_state.get ctxt tx_rollup >>=? fun (ctxt, state) -> - Tx_rollup_commitment.finalize_commitment ctxt tx_rollup state - >>=? fun (ctxt, state, level) -> - Tx_rollup_state.update ctxt tx_rollup state >>=? fun ctxt -> - let result = - Tx_rollup_finalize_commitment_result - { - consumed_gas = Gas.consumed ~since:ctxt_before_op ~until:ctxt; - balance_updates = []; - level; - } - in - return (ctxt, result, []) - | Tx_rollup_remove_commitment {tx_rollup} -> - Tx_rollup_state.get ctxt tx_rollup >>=? fun (ctxt, state) -> - Tx_rollup_commitment.remove_commitment ctxt tx_rollup state - >>=? fun (ctxt, state, level) -> - Tx_rollup_state.update ctxt tx_rollup state >>=? fun ctxt -> - let result = - Tx_rollup_remove_commitment_result - { - consumed_gas = Gas.consumed ~since:ctxt_before_op ~until:ctxt; - balance_updates = []; - level; - } - in - return (ctxt, result, []) - | Tx_rollup_rejection - { - proof; - tx_rollup; - level; - message; - 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 () -> - Tx_rollup_commitment.get ctxt tx_rollup state level - >>=? fun (ctxt, commitment) -> - (* Check [message] *) - error_when - Compare.Int.( - message_position < 0 - || commitment.commitment.messages.count <= message_position) - (Tx_rollup_errors.Wrong_message_position - { - level = commitment.commitment.level; - position = message_position; - length = commitment.commitment.messages.count; - }) - >>?= fun () -> - Tx_rollup_inbox.check_message_hash - ctxt - level - tx_rollup - ~position:message_position - 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. - { - tx_rollup_max_withdrawals_per_batch = - Constants.tx_rollup_max_withdrawals_per_batch ctxt; - } - in - let proof_length = Tx_rollup_l2_proof.length proof in - match Tx_rollup_l2_proof.proof_of_serialized_opt proof with - | Some proof -> - Tx_rollup_l2_verifier.verify_proof - ctxt - parameters - message - proof - ~proof_length - ~agreed:previous_message_result - ~rejected:message_result_hash - ~max_proof_size:(Constants.tx_rollup_rejection_max_proof_size ctxt) - >>=? fun ctxt -> - (* Proof is correct, removing *) - Tx_rollup_commitment.reject_commitment ctxt tx_rollup state level - >>=? fun (ctxt, state) -> - (* Bond slashing, and removing *) - Tx_rollup_commitment.slash_bond ctxt tx_rollup commitment.committer - >>=? fun (ctxt, slashed) -> - (if slashed then - let committer = Contract.Implicit commitment.committer in - let bid = Bond_id.Tx_rollup_bond_id tx_rollup in - Token.balance ctxt (`Frozen_bonds (committer, bid)) - >>=? fun (ctxt, burn) -> - Tez.(burn /? 2L) >>?= fun reward -> - Token.transfer - ctxt - (`Frozen_bonds (committer, bid)) - `Tx_rollup_rejection_punishments - burn - >>=? fun (ctxt, burn_update) -> - Token.transfer - ctxt - `Tx_rollup_rejection_rewards - (`Contract source_contract) - reward - >>=? fun (ctxt, reward_update) -> - return (ctxt, burn_update @ reward_update) - else return (ctxt, [])) - >>=? fun (ctxt, balance_updates) -> - (* Update state and conclude *) - Tx_rollup_state.update ctxt tx_rollup state >>=? fun ctxt -> - let result = - Tx_rollup_rejection_result - { - consumed_gas = Gas.consumed ~since:ctxt_before_op ~until:ctxt; - balance_updates; - } - in - return (ctxt, result, []) - | None -> tzfail Tx_rollup_errors.Proof_undecodable) | Dal_publish_slot_header slot_header -> Dal_apply.apply_publish_slot_header ctxt slot_header >>?= fun (ctxt, slot_header) -> @@ -1775,17 +1449,6 @@ let burn_manager_storage_fees : | Set_deposits_limit_result _ | Update_consensus_key_result _ -> return (ctxt, storage_limit, smopr) | Increase_paid_storage_result _ -> return (ctxt, storage_limit, smopr) - | Tx_rollup_origination_result payload -> - Fees.burn_tx_rollup_origination_fees ctxt ~storage_limit ~payer - >|=? fun (ctxt, storage_limit, origination_bus) -> - let balance_updates = origination_bus @ payload.balance_updates in - ( ctxt, - 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_finalize_commitment_result _ - | Tx_rollup_commit_result _ -> - return (ctxt, storage_limit, smopr) | Transfer_ticket_result payload -> let consumed = payload.paid_storage_size_diff in Fees.burn_storage_fees ctxt ~storage_limit ~payer consumed @@ -1794,22 +1457,6 @@ let burn_manager_storage_fees : ( ctxt, storage_limit, Transfer_ticket_result {payload with balance_updates} ) - | 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) -> - let balance_updates = storage_bus @ payload.balance_updates in - ( ctxt, - storage_limit, - 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) -> - let balance_updates = storage_bus @ payload.balance_updates in - ( ctxt, - storage_limit, - Tx_rollup_dispatch_tickets_result {payload with balance_updates} ) | Dal_publish_slot_header_result _ -> return (ctxt, storage_limit, smopr) | Sc_rollup_originate_result payload -> Fees.burn_sc_rollup_origination_fees diff --git a/src/proto_alpha/lib_protocol/apply_results.ml b/src/proto_alpha/lib_protocol/apply_results.ml index eea14aca5d28..d012b62a4eee 100644 --- a/src/proto_alpha/lib_protocol/apply_results.ml +++ b/src/proto_alpha/lib_protocol/apply_results.ml @@ -70,51 +70,6 @@ type _ successful_manager_operation_result = consumed_gas : Gas.Arith.fp; } -> Kind.update_consensus_key successful_manager_operation_result - | Tx_rollup_origination_result : { - balance_updates : Receipt.balance_updates; - consumed_gas : Gas.Arith.fp; - originated_tx_rollup : Tx_rollup.t; - } - -> Kind.tx_rollup_origination successful_manager_operation_result - | Tx_rollup_submit_batch_result : { - balance_updates : Receipt.balance_updates; - consumed_gas : Gas.Arith.fp; - paid_storage_size_diff : Z.t; - } - -> Kind.tx_rollup_submit_batch successful_manager_operation_result - | Tx_rollup_commit_result : { - balance_updates : Receipt.balance_updates; - consumed_gas : Gas.Arith.fp; - } - -> Kind.tx_rollup_commit successful_manager_operation_result - | Tx_rollup_return_bond_result : { - balance_updates : Receipt.balance_updates; - consumed_gas : Gas.Arith.fp; - } - -> Kind.tx_rollup_return_bond successful_manager_operation_result - | Tx_rollup_finalize_commitment_result : { - balance_updates : Receipt.balance_updates; - consumed_gas : Gas.Arith.fp; - level : Tx_rollup_level.t; - } - -> Kind.tx_rollup_finalize_commitment successful_manager_operation_result - | Tx_rollup_remove_commitment_result : { - balance_updates : Receipt.balance_updates; - consumed_gas : Gas.Arith.fp; - level : Tx_rollup_level.t; - } - -> Kind.tx_rollup_remove_commitment successful_manager_operation_result - | Tx_rollup_rejection_result : { - balance_updates : Receipt.balance_updates; - consumed_gas : Gas.Arith.fp; - } - -> Kind.tx_rollup_rejection successful_manager_operation_result - | Tx_rollup_dispatch_tickets_result : { - balance_updates : Receipt.balance_updates; - consumed_gas : Gas.Arith.fp; - paid_storage_size_diff : Z.t; - } - -> Kind.tx_rollup_dispatch_tickets successful_manager_operation_result | Transfer_ticket_result : { balance_updates : Receipt.balance_updates; ticket_receipt : Ticket_receipt.t; @@ -572,178 +527,6 @@ module Manager_result = struct ~inj:(fun (balance_updates, consumed_gas) -> Increase_paid_storage_result {balance_updates; consumed_gas}) - let tx_rollup_origination_case = - make - ~op_case:Operation.Encoding.Manager_operations.tx_rollup_origination_case - ~encoding: - Data_encoding.( - obj3 - (req "balance_updates" Receipt.balance_updates_encoding) - (dft "consumed_milligas" Gas.Arith.n_fp_encoding Gas.Arith.zero) - (req "originated_rollup" Tx_rollup.encoding)) - ~select:(function - | Successful_manager_result (Tx_rollup_origination_result _ as op) -> - Some op - | _ -> None) - ~kind:Kind.Tx_rollup_origination_manager_kind - ~proj:(function - | Tx_rollup_origination_result - {balance_updates; consumed_gas; originated_tx_rollup} -> - (balance_updates, consumed_gas, originated_tx_rollup)) - ~inj:(fun (balance_updates, consumed_gas, originated_tx_rollup) -> - Tx_rollup_origination_result - {balance_updates; consumed_gas; originated_tx_rollup}) - - let tx_rollup_submit_batch_case = - make - ~op_case:Operation.Encoding.Manager_operations.tx_rollup_submit_batch_case - ~encoding: - Data_encoding.( - obj3 - (req "balance_updates" Receipt.balance_updates_encoding) - (dft "consumed_milligas" Gas.Arith.n_fp_encoding Gas.Arith.zero) - (req "paid_storage_size_diff" n)) - ~select:(function - | Successful_manager_result (Tx_rollup_submit_batch_result _ as op) -> - Some op - | _ -> None) - ~kind:Kind.Tx_rollup_submit_batch_manager_kind - ~proj:(function - | Tx_rollup_submit_batch_result - {balance_updates; consumed_gas; paid_storage_size_diff} -> - (balance_updates, consumed_gas, paid_storage_size_diff)) - ~inj:(fun (balance_updates, consumed_gas, paid_storage_size_diff) -> - Tx_rollup_submit_batch_result - {balance_updates; consumed_gas; paid_storage_size_diff}) - - let tx_rollup_commit_case = - make - ~op_case:Operation.Encoding.Manager_operations.tx_rollup_commit_case - ~encoding: - Data_encoding.( - obj2 - (req "balance_updates" Receipt.balance_updates_encoding) - (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} -> - (balance_updates, consumed_gas)) - ~inj:(fun (balance_updates, consumed_gas) -> - Tx_rollup_commit_result {balance_updates; consumed_gas}) - - let tx_rollup_return_bond_case = - make - ~op_case:Operation.Encoding.Manager_operations.tx_rollup_return_bond_case - ~encoding: - Data_encoding.( - obj2 - (req "balance_updates" Receipt.balance_updates_encoding) - (dft "consumed_milligas" Gas.Arith.n_fp_encoding Gas.Arith.zero)) - ~select:(function - | Successful_manager_result (Tx_rollup_return_bond_result _ as op) -> - Some op - | _ -> None) - ~kind:Kind.Tx_rollup_return_bond_manager_kind - ~proj:(function - | Tx_rollup_return_bond_result {balance_updates; consumed_gas} -> - (balance_updates, consumed_gas)) - ~inj:(fun (balance_updates, consumed_gas) -> - Tx_rollup_return_bond_result {balance_updates; consumed_gas}) - - let tx_rollup_finalize_commitment_case = - make - ~op_case: - Operation.Encoding.Manager_operations.tx_rollup_finalize_commitment_case - ~encoding: - Data_encoding.( - obj3 - (req "balance_updates" Receipt.balance_updates_encoding) - (dft "consumed_milligas" Gas.Arith.n_fp_encoding Gas.Arith.zero) - (req "level" Tx_rollup_level.encoding)) - ~select:(function - | Successful_manager_result - (Tx_rollup_finalize_commitment_result _ as op) -> - Some op - | _ -> None) - ~kind:Kind.Tx_rollup_finalize_commitment_manager_kind - ~proj:(function - | Tx_rollup_finalize_commitment_result - {balance_updates; consumed_gas; level} -> - (balance_updates, consumed_gas, level)) - ~inj:(fun (balance_updates, consumed_gas, level) -> - Tx_rollup_finalize_commitment_result - {balance_updates; consumed_gas; level}) - - let tx_rollup_remove_commitment_case = - make - ~op_case: - Operation.Encoding.Manager_operations.tx_rollup_remove_commitment_case - ~encoding: - Data_encoding.( - obj3 - (req "balance_updates" Receipt.balance_updates_encoding) - (dft "consumed_milligas" Gas.Arith.n_fp_encoding Gas.Arith.zero) - (req "level" Tx_rollup_level.encoding)) - ~select:(function - | Successful_manager_result (Tx_rollup_remove_commitment_result _ as op) - -> - Some op - | _ -> None) - ~kind:Kind.Tx_rollup_remove_commitment_manager_kind - ~proj:(function - | Tx_rollup_remove_commitment_result - {balance_updates; consumed_gas; level} -> - (balance_updates, consumed_gas, level)) - ~inj:(fun (balance_updates, consumed_gas, level) -> - Tx_rollup_remove_commitment_result - {balance_updates; consumed_gas; level}) - - let tx_rollup_rejection_case = - make - ~op_case:Operation.Encoding.Manager_operations.tx_rollup_rejection_case - ~encoding: - Data_encoding.( - obj2 - (req "balance_updates" Receipt.balance_updates_encoding) - (dft "consumed_milligas" Gas.Arith.n_fp_encoding Gas.Arith.zero)) - ~select:(function - | Successful_manager_result (Tx_rollup_rejection_result _ as op) -> - Some op - | _ -> None) - ~kind:Kind.Tx_rollup_rejection_manager_kind - ~proj:(function - | Tx_rollup_rejection_result {balance_updates; consumed_gas} -> - (balance_updates, consumed_gas)) - ~inj:(fun (balance_updates, consumed_gas) -> - Tx_rollup_rejection_result {balance_updates; consumed_gas}) - - let tx_rollup_dispatch_tickets_case = - make - ~op_case: - Operation.Encoding.Manager_operations.tx_rollup_dispatch_tickets_case - ~encoding: - Data_encoding.( - obj3 - (req "balance_updates" Receipt.balance_updates_encoding) - (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_dispatch_tickets_result _ as op) - -> - Some op - | _ -> None) - ~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, consumed_gas, paid_storage_size_diff)) - ~inj:(fun (balance_updates, consumed_gas, paid_storage_size_diff) -> - Tx_rollup_dispatch_tickets_result - {balance_updates; consumed_gas; paid_storage_size_diff}) - let transfer_ticket_case = make ~op_case:Operation.Encoding.Manager_operations.transfer_ticket_case @@ -1192,37 +975,6 @@ let equal_manager_kind : Kind.Increase_paid_storage_manager_kind ) -> Some Eq | Kind.Increase_paid_storage_manager_kind, _ -> None - | ( Kind.Tx_rollup_origination_manager_kind, - Kind.Tx_rollup_origination_manager_kind ) -> - Some Eq - | Kind.Tx_rollup_origination_manager_kind, _ -> None - | ( Kind.Tx_rollup_submit_batch_manager_kind, - Kind.Tx_rollup_submit_batch_manager_kind ) -> - Some Eq - | Kind.Tx_rollup_submit_batch_manager_kind, _ -> None - | Kind.Tx_rollup_commit_manager_kind, Kind.Tx_rollup_commit_manager_kind -> - Some Eq - | Kind.Tx_rollup_commit_manager_kind, _ -> None - | ( Kind.Tx_rollup_return_bond_manager_kind, - Kind.Tx_rollup_return_bond_manager_kind ) -> - Some Eq - | Kind.Tx_rollup_return_bond_manager_kind, _ -> None - | ( Kind.Tx_rollup_finalize_commitment_manager_kind, - Kind.Tx_rollup_finalize_commitment_manager_kind ) -> - Some Eq - | Kind.Tx_rollup_finalize_commitment_manager_kind, _ -> None - | ( Kind.Tx_rollup_remove_commitment_manager_kind, - Kind.Tx_rollup_remove_commitment_manager_kind ) -> - Some Eq - | Kind.Tx_rollup_remove_commitment_manager_kind, _ -> None - | Kind.Tx_rollup_rejection_manager_kind, Kind.Tx_rollup_rejection_manager_kind - -> - Some Eq - | Kind.Tx_rollup_rejection_manager_kind, _ -> None - | ( 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.Transfer_ticket_manager_kind, _ -> None @@ -1713,97 +1465,6 @@ module Encoding = struct Some (op, res) | _ -> None) - let tx_rollup_origination_case = - make_manager_case - Operation.Encoding.tx_rollup_origination_case - Manager_result.tx_rollup_origination_case - (function - | Contents_and_result - ( (Manager_operation {operation = Tx_rollup_origination; _} as op), - res ) -> - Some (op, res) - | _ -> None) - - let tx_rollup_submit_batch_case = - make_manager_case - Operation.Encoding.tx_rollup_submit_batch_case - Manager_result.tx_rollup_submit_batch_case - (function - | Contents_and_result - ( (Manager_operation {operation = Tx_rollup_submit_batch _; _} as op), - res ) -> - Some (op, res) - | _ -> None) - - let tx_rollup_commit_case = - make_manager_case - Operation.Encoding.tx_rollup_commit_case - Manager_result.tx_rollup_commit_case - (function - | Contents_and_result - ((Manager_operation {operation = Tx_rollup_commit _; _} as op), res) - -> - Some (op, res) - | _ -> None) - - let tx_rollup_return_bond_case = - make_manager_case - Operation.Encoding.tx_rollup_return_bond_case - Manager_result.tx_rollup_return_bond_case - (function - | Contents_and_result - ( (Manager_operation {operation = Tx_rollup_return_bond _; _} as op), - res ) -> - Some (op, res) - | _ -> None) - - let tx_rollup_finalize_commitment_case = - make_manager_case - Operation.Encoding.tx_rollup_finalize_commitment_case - Manager_result.tx_rollup_finalize_commitment_case - (function - | Contents_and_result - ( (Manager_operation {operation = Tx_rollup_finalize_commitment _; _} - as op), - res ) -> - Some (op, res) - | _ -> None) - - let tx_rollup_remove_commitment_case = - make_manager_case - Operation.Encoding.tx_rollup_remove_commitment_case - Manager_result.tx_rollup_remove_commitment_case - (function - | Contents_and_result - ( (Manager_operation {operation = Tx_rollup_remove_commitment _; _} - as op), - res ) -> - Some (op, res) - | _ -> None) - - let tx_rollup_rejection_case = - make_manager_case - Operation.Encoding.tx_rollup_rejection_case - Manager_result.tx_rollup_rejection_case - (function - | Contents_and_result - ( (Manager_operation {operation = Tx_rollup_rejection _; _} as op), - res ) -> - Some (op, res) - | _ -> None) - - let tx_rollup_dispatch_tickets_case = - make_manager_case - Operation.Encoding.tx_rollup_dispatch_tickets_case - Manager_result.tx_rollup_dispatch_tickets_case - (function - | Contents_and_result - ( (Manager_operation {operation = Tx_rollup_dispatch_tickets _; _} - as op), - res ) -> - Some (op, res) - | _ -> None) - let transfer_ticket_case = make_manager_case Operation.Encoding.transfer_ticket_case @@ -1989,14 +1650,6 @@ let contents_result_encoding = make set_deposits_limit_case; make increase_paid_storage_case; make update_consensus_key_case; - make tx_rollup_origination_case; - make tx_rollup_submit_batch_case; - make tx_rollup_commit_case; - make tx_rollup_return_bond_case; - make tx_rollup_finalize_commitment_case; - make tx_rollup_remove_commitment_case; - make tx_rollup_rejection_case; - make tx_rollup_dispatch_tickets_case; make transfer_ticket_case; make dal_publish_slot_header_case; make sc_rollup_originate_case; @@ -2056,16 +1709,8 @@ let contents_and_result_encoding = make increase_paid_storage_case; make update_consensus_key_case; make drain_delegate_case; - make tx_rollup_origination_case; - make tx_rollup_submit_batch_case; - make tx_rollup_commit_case; - make tx_rollup_return_bond_case; - make tx_rollup_finalize_commitment_case; - make tx_rollup_remove_commitment_case; - make tx_rollup_rejection_case; make transfer_ticket_case; make dal_publish_slot_header_case; - make tx_rollup_dispatch_tickets_case; make sc_rollup_originate_case; make sc_rollup_add_messages_case; make sc_rollup_cement_case; @@ -2411,109 +2056,6 @@ let kind_equal : } ) -> Some Eq | Manager_operation {operation = Increase_paid_storage _; _}, _ -> None - | ( Manager_operation {operation = Tx_rollup_origination; _}, - Manager_operation_result - {operation_result = Applied (Tx_rollup_origination_result _); _} ) -> - Some Eq - | ( Manager_operation {operation = Tx_rollup_origination; _}, - Manager_operation_result - {operation_result = Backtracked (Tx_rollup_origination_result _, _); _} - ) -> - Some Eq - | ( Manager_operation {operation = Tx_rollup_origination; _}, - Manager_operation_result - { - operation_result = - Failed (Alpha_context.Kind.Tx_rollup_origination_manager_kind, _); - _; - } ) -> - Some Eq - | ( Manager_operation {operation = Tx_rollup_origination; _}, - Manager_operation_result - { - operation_result = - Skipped Alpha_context.Kind.Tx_rollup_origination_manager_kind; - _; - } ) -> - Some Eq - | Manager_operation {operation = Tx_rollup_origination; _}, _ -> None - | ( Manager_operation {operation = Tx_rollup_submit_batch _; _}, - Manager_operation_result - {operation_result = Applied (Tx_rollup_submit_batch_result _); _} ) -> - Some Eq - | ( Manager_operation {operation = Tx_rollup_submit_batch _; _}, - Manager_operation_result - {operation_result = Backtracked (Tx_rollup_submit_batch_result _, _); _} - ) -> - Some Eq - | ( Manager_operation {operation = Tx_rollup_submit_batch _; _}, - Manager_operation_result - { - operation_result = - Failed (Alpha_context.Kind.Tx_rollup_submit_batch_manager_kind, _); - _; - } ) -> - Some Eq - | ( Manager_operation {operation = Tx_rollup_submit_batch _; _}, - Manager_operation_result - { - operation_result = - Skipped Alpha_context.Kind.Tx_rollup_submit_batch_manager_kind; - _; - } ) -> - Some Eq - | Manager_operation {operation = Tx_rollup_submit_batch _; _}, _ -> None - | ( Manager_operation {operation = Tx_rollup_commit _; _}, - Manager_operation_result - {operation_result = Applied (Tx_rollup_commit_result _); _} ) -> - Some Eq - | ( Manager_operation {operation = Tx_rollup_commit _; _}, - Manager_operation_result - {operation_result = Backtracked (Tx_rollup_commit_result _, _); _} ) -> - Some Eq - | ( Manager_operation {operation = Tx_rollup_commit _; _}, - Manager_operation_result - { - operation_result = - Failed (Alpha_context.Kind.Tx_rollup_commit_manager_kind, _); - _; - } ) -> - Some Eq - | ( Manager_operation {operation = Tx_rollup_commit _; _}, - Manager_operation_result - { - operation_result = - Skipped Alpha_context.Kind.Tx_rollup_commit_manager_kind; - _; - } ) -> - Some Eq - | Manager_operation {operation = Tx_rollup_commit _; _}, _ -> None - | ( Manager_operation {operation = Tx_rollup_return_bond _; _}, - Manager_operation_result - {operation_result = Applied (Tx_rollup_return_bond_result _); _} ) -> - Some Eq - | ( Manager_operation {operation = Tx_rollup_return_bond _; _}, - Manager_operation_result - {operation_result = Backtracked (Tx_rollup_return_bond_result _, _); _} - ) -> - Some Eq - | ( Manager_operation {operation = Tx_rollup_return_bond _; _}, - Manager_operation_result - { - operation_result = - Failed (Alpha_context.Kind.Tx_rollup_return_bond_manager_kind, _); - _; - } ) -> - Some Eq - | ( Manager_operation {operation = Tx_rollup_return_bond _; _}, - Manager_operation_result - { - operation_result = - Skipped Alpha_context.Kind.Tx_rollup_return_bond_manager_kind; - _; - } ) -> - Some Eq - | Manager_operation {operation = Tx_rollup_return_bond _; _}, _ -> None | ( Manager_operation {operation = Sc_rollup_recover_bond _; _}, Manager_operation_result {operation_result = Applied (Sc_rollup_recover_bond_result _); _} ) -> @@ -2540,126 +2082,6 @@ let kind_equal : } ) -> Some Eq | Manager_operation {operation = Sc_rollup_recover_bond _; _}, _ -> None - | ( Manager_operation {operation = Tx_rollup_finalize_commitment _; _}, - Manager_operation_result - {operation_result = Applied (Tx_rollup_finalize_commitment_result _); _} - ) -> - Some Eq - | ( Manager_operation {operation = Tx_rollup_finalize_commitment _; _}, - Manager_operation_result - { - operation_result = - Backtracked (Tx_rollup_finalize_commitment_result _, _); - _; - } ) -> - Some Eq - | ( Manager_operation {operation = Tx_rollup_finalize_commitment _; _}, - Manager_operation_result - { - operation_result = - Failed - (Alpha_context.Kind.Tx_rollup_finalize_commitment_manager_kind, _); - _; - } ) -> - Some Eq - | ( Manager_operation {operation = Tx_rollup_finalize_commitment _; _}, - Manager_operation_result - { - operation_result = - Skipped - Alpha_context.Kind.Tx_rollup_finalize_commitment_manager_kind; - _; - } ) -> - Some Eq - | Manager_operation {operation = Tx_rollup_finalize_commitment _; _}, _ -> - None - | ( Manager_operation {operation = Tx_rollup_remove_commitment _; _}, - Manager_operation_result - {operation_result = Applied (Tx_rollup_remove_commitment_result _); _} ) - -> - Some Eq - | ( Manager_operation {operation = Tx_rollup_remove_commitment _; _}, - Manager_operation_result - { - operation_result = - Backtracked (Tx_rollup_remove_commitment_result _, _); - _; - } ) -> - Some Eq - | ( Manager_operation {operation = Tx_rollup_remove_commitment _; _}, - Manager_operation_result - { - operation_result = - Failed - (Alpha_context.Kind.Tx_rollup_remove_commitment_manager_kind, _); - _; - } ) -> - Some Eq - | ( Manager_operation {operation = Tx_rollup_remove_commitment _; _}, - Manager_operation_result - { - operation_result = - Skipped Alpha_context.Kind.Tx_rollup_remove_commitment_manager_kind; - _; - } ) -> - Some Eq - | Manager_operation {operation = Tx_rollup_remove_commitment _; _}, _ -> None - | ( Manager_operation {operation = Tx_rollup_rejection _; _}, - Manager_operation_result - {operation_result = Applied (Tx_rollup_rejection_result _); _} ) -> - Some Eq - | ( Manager_operation {operation = Tx_rollup_rejection _; _}, - Manager_operation_result - {operation_result = Backtracked (Tx_rollup_rejection_result _, _); _} ) - -> - Some Eq - | ( Manager_operation {operation = Tx_rollup_rejection _; _}, - Manager_operation_result - { - operation_result = - Failed (Alpha_context.Kind.Tx_rollup_rejection_manager_kind, _); - _; - } ) -> - Some Eq - | ( Manager_operation {operation = Tx_rollup_rejection _; _}, - Manager_operation_result - { - operation_result = - Skipped Alpha_context.Kind.Tx_rollup_rejection_manager_kind; - _; - } ) -> - Some Eq - | Manager_operation {operation = Tx_rollup_rejection _; _}, _ -> None - | ( Manager_operation {operation = Tx_rollup_dispatch_tickets _; _}, - Manager_operation_result - {operation_result = Applied (Tx_rollup_dispatch_tickets_result _); _} ) - -> - Some Eq - | ( Manager_operation {operation = Tx_rollup_dispatch_tickets _; _}, - Manager_operation_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 _); _} ) -> diff --git a/src/proto_alpha/lib_protocol/apply_results.mli b/src/proto_alpha/lib_protocol/apply_results.mli index 7cb5bff54a7b..2729970303a1 100644 --- a/src/proto_alpha/lib_protocol/apply_results.mli +++ b/src/proto_alpha/lib_protocol/apply_results.mli @@ -173,51 +173,6 @@ and _ successful_manager_operation_result = consumed_gas : Gas.Arith.fp; } -> Kind.update_consensus_key successful_manager_operation_result - | Tx_rollup_origination_result : { - balance_updates : Receipt.balance_updates; - consumed_gas : Gas.Arith.fp; - originated_tx_rollup : Tx_rollup.t; - } - -> Kind.tx_rollup_origination successful_manager_operation_result - | Tx_rollup_submit_batch_result : { - balance_updates : Receipt.balance_updates; - consumed_gas : Gas.Arith.fp; - paid_storage_size_diff : Z.t; - } - -> Kind.tx_rollup_submit_batch successful_manager_operation_result - | Tx_rollup_commit_result : { - balance_updates : Receipt.balance_updates; - consumed_gas : Gas.Arith.fp; - } - -> Kind.tx_rollup_commit successful_manager_operation_result - | Tx_rollup_return_bond_result : { - balance_updates : Receipt.balance_updates; - consumed_gas : Gas.Arith.fp; - } - -> Kind.tx_rollup_return_bond successful_manager_operation_result - | Tx_rollup_finalize_commitment_result : { - balance_updates : Receipt.balance_updates; - consumed_gas : Gas.Arith.fp; - level : Tx_rollup_level.t; - } - -> Kind.tx_rollup_finalize_commitment successful_manager_operation_result - | Tx_rollup_remove_commitment_result : { - balance_updates : Receipt.balance_updates; - consumed_gas : Gas.Arith.fp; - level : Tx_rollup_level.t; - } - -> Kind.tx_rollup_remove_commitment successful_manager_operation_result - | Tx_rollup_rejection_result : { - balance_updates : Receipt.balance_updates; - consumed_gas : Gas.Arith.fp; - } - -> Kind.tx_rollup_rejection successful_manager_operation_result - | Tx_rollup_dispatch_tickets_result : { - balance_updates : Receipt.balance_updates; - consumed_gas : Gas.Arith.fp; - paid_storage_size_diff : Z.t; - } - -> Kind.tx_rollup_dispatch_tickets successful_manager_operation_result | Transfer_ticket_result : { balance_updates : Receipt.balance_updates; ticket_receipt : Ticket_receipt.t; diff --git a/src/proto_alpha/lib_protocol/operation_repr.ml b/src/proto_alpha/lib_protocol/operation_repr.ml index c27e2e3b2f14..132ae6bbab73 100644 --- a/src/proto_alpha/lib_protocol/operation_repr.ml +++ b/src/proto_alpha/lib_protocol/operation_repr.ml @@ -84,22 +84,6 @@ module Kind = struct type register_global_constant = Register_global_constant_kind - type tx_rollup_origination = Tx_rollup_origination_kind - - type tx_rollup_submit_batch = Tx_rollup_submit_batch_kind - - type tx_rollup_commit = Tx_rollup_commit_kind - - type tx_rollup_return_bond = Tx_rollup_return_bond_kind - - type tx_rollup_finalize_commitment = Tx_rollup_finalize_commitment_kind - - type tx_rollup_remove_commitment = Tx_rollup_remove_commitment_kind - - type tx_rollup_rejection = Tx_rollup_rejection_kind - - type tx_rollup_dispatch_tickets = Tx_rollup_dispatch_tickets_kind - type transfer_ticket = Transfer_ticket_kind type dal_publish_slot_header = Dal_publish_slot_header_kind @@ -137,17 +121,6 @@ module Kind = struct | Set_deposits_limit_manager_kind : set_deposits_limit manager | Increase_paid_storage_manager_kind : increase_paid_storage manager | Update_consensus_key_manager_kind : update_consensus_key manager - | Tx_rollup_origination_manager_kind : tx_rollup_origination manager - | Tx_rollup_submit_batch_manager_kind : tx_rollup_submit_batch manager - | Tx_rollup_commit_manager_kind : tx_rollup_commit manager - | Tx_rollup_return_bond_manager_kind : tx_rollup_return_bond manager - | Tx_rollup_finalize_commitment_manager_kind - : tx_rollup_finalize_commitment manager - | Tx_rollup_remove_commitment_manager_kind - : tx_rollup_remove_commitment manager - | Tx_rollup_rejection_manager_kind : tx_rollup_rejection manager - | Tx_rollup_dispatch_tickets_manager_kind - : tx_rollup_dispatch_tickets manager | Transfer_ticket_manager_kind : transfer_ticket manager | Dal_publish_slot_header_manager_kind : dal_publish_slot_header manager | Sc_rollup_originate_manager_kind : sc_rollup_originate manager @@ -367,52 +340,6 @@ and _ manager_operation = | Update_consensus_key : Signature.Public_key.t -> Kind.update_consensus_key manager_operation - | Tx_rollup_origination : Kind.tx_rollup_origination manager_operation - | Tx_rollup_submit_batch : { - tx_rollup : Tx_rollup_repr.t; - content : string; - burn_limit : Tez_repr.t option; - } - -> Kind.tx_rollup_submit_batch manager_operation - | Tx_rollup_commit : { - tx_rollup : Tx_rollup_repr.t; - commitment : Tx_rollup_commitment_repr.Full.t; - } - -> Kind.tx_rollup_commit manager_operation - | Tx_rollup_return_bond : { - tx_rollup : Tx_rollup_repr.t; - } - -> Kind.tx_rollup_return_bond manager_operation - | Tx_rollup_finalize_commitment : { - tx_rollup : Tx_rollup_repr.t; - } - -> Kind.tx_rollup_finalize_commitment manager_operation - | Tx_rollup_remove_commitment : { - tx_rollup : Tx_rollup_repr.t; - } - -> Kind.tx_rollup_remove_commitment manager_operation - | Tx_rollup_rejection : { - tx_rollup : Tx_rollup_repr.t; - level : Tx_rollup_level_repr.t; - 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.serialized; - } - -> Kind.tx_rollup_rejection manager_operation - | Tx_rollup_dispatch_tickets : { - tx_rollup : Tx_rollup_repr.t; - 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 | Transfer_ticket : { contents : Script_repr.lazy_expr; ty : Script_repr.lazy_expr; @@ -496,16 +423,6 @@ let manager_kind : type kind. kind manager_operation -> kind Kind.manager = | Set_deposits_limit _ -> Kind.Set_deposits_limit_manager_kind | Increase_paid_storage _ -> Kind.Increase_paid_storage_manager_kind | Update_consensus_key _ -> Kind.Update_consensus_key_manager_kind - | Tx_rollup_origination -> Kind.Tx_rollup_origination_manager_kind - | Tx_rollup_submit_batch _ -> Kind.Tx_rollup_submit_batch_manager_kind - | Tx_rollup_commit _ -> Kind.Tx_rollup_commit_manager_kind - | Tx_rollup_return_bond _ -> Kind.Tx_rollup_return_bond_manager_kind - | Tx_rollup_finalize_commitment _ -> - Kind.Tx_rollup_finalize_commitment_manager_kind - | Tx_rollup_remove_commitment _ -> - Kind.Tx_rollup_remove_commitment_manager_kind - | Tx_rollup_rejection _ -> Kind.Tx_rollup_rejection_manager_kind - | Tx_rollup_dispatch_tickets _ -> Kind.Tx_rollup_dispatch_tickets_manager_kind | Transfer_ticket _ -> Kind.Transfer_ticket_manager_kind | Dal_publish_slot_header _ -> Kind.Dal_publish_slot_header_manager_kind | Sc_rollup_originate _ -> Kind.Sc_rollup_originate_manager_kind @@ -596,6 +513,20 @@ let tx_rollup_operation_rejection_tag = tx_rollup_operation_tag_offset + 6 let tx_rollup_operation_dispatch_tickets_tag = tx_rollup_operation_tag_offset + 7 +(** The following operation tags cannot be used again, it is checked + at compilation time. *) +let tx_rollup_forbidden_operation_tags = + [ + tx_rollup_operation_origination_tag; + tx_rollup_operation_submit_batch_tag; + tx_rollup_operation_commit_tag; + tx_rollup_operation_return_bond_tag; + tx_rollup_operation_finalize_commitment_tag; + tx_rollup_operation_remove_commitment_tag; + tx_rollup_operation_rejection_tag; + tx_rollup_operation_dispatch_tickets_tag; + ] + let transfer_ticket_tag = tx_rollup_operation_tag_offset + 8 let sc_rollup_operation_tag_offset = 200 @@ -631,8 +562,14 @@ let zk_rollup_operation_update_tag = zk_rollup_operation_tag_offset + 2 module Encoding = struct open Data_encoding - (** These tags are reserved for future extensions: [fd] - [ff]. *) - let reserved_tag t = Compare.Int.(t >= 0xfd) + (** These tags can not be used yet for operations. *) + let reserved_tag t = + (* These tags are reserved for future extensions: [fd] - [ff]. *) + Compare.Int.(t >= 0xfd) + || (* These tags were used by old operations. + The operations have been removed in protocol proposal N, it can + be unblocked in the future (e.g. proposal O, P etc.). *) + List.exists (Compare.Int.equal t) tx_rollup_forbidden_operation_tags let signature_prefix_tag = 0xff @@ -801,239 +738,6 @@ module Encoding = struct inj = (fun consensus_pk -> Update_consensus_key consensus_pk); } - let tx_rollup_origination_case = - MCase - { - tag = tx_rollup_operation_origination_tag; - name = "tx_rollup_origination"; - encoding = obj1 (req "tx_rollup_origination" Data_encoding.unit); - select = - (function - | Manager (Tx_rollup_origination as op) -> Some op | _ -> None); - proj = (function Tx_rollup_origination -> ()); - inj = (fun () -> Tx_rollup_origination); - } - - let tx_rollup_submit_batch_case = - MCase - { - tag = tx_rollup_operation_submit_batch_tag; - name = "tx_rollup_submit_batch"; - encoding = - obj3 - (req "rollup" Tx_rollup_repr.encoding) - (req "content" (string Hex)) - (opt "burn_limit" Tez_repr.encoding); - select = - (function - | Manager (Tx_rollup_submit_batch _ as op) -> Some op | _ -> None); - proj = - (function - | Tx_rollup_submit_batch {tx_rollup; content; burn_limit} -> - (tx_rollup, content, burn_limit)); - inj = - (fun (tx_rollup, content, burn_limit) -> - Tx_rollup_submit_batch {tx_rollup; content; burn_limit}); - } - - let tx_rollup_commit_case = - MCase - { - tag = tx_rollup_operation_commit_tag; - name = "tx_rollup_commit"; - encoding = - obj2 - (req "rollup" Tx_rollup_repr.encoding) - (req "commitment" Tx_rollup_commitment_repr.Full.encoding); - select = - (function - | Manager (Tx_rollup_commit _ as op) -> Some op | _ -> None); - proj = - (function - | Tx_rollup_commit {tx_rollup; commitment} -> (tx_rollup, commitment)); - inj = - (fun (tx_rollup, commitment) -> - Tx_rollup_commit {tx_rollup; commitment}); - } - - let tx_rollup_return_bond_case = - MCase - { - tag = tx_rollup_operation_return_bond_tag; - name = "tx_rollup_return_bond"; - encoding = obj1 (req "rollup" Tx_rollup_repr.encoding); - select = - (function - | Manager (Tx_rollup_return_bond _ as op) -> Some op | _ -> None); - proj = (function Tx_rollup_return_bond {tx_rollup} -> tx_rollup); - inj = (fun tx_rollup -> Tx_rollup_return_bond {tx_rollup}); - } - - let tx_rollup_finalize_commitment_case = - MCase - { - tag = tx_rollup_operation_finalize_commitment_tag; - name = "tx_rollup_finalize_commitment"; - encoding = obj1 (req "rollup" Tx_rollup_repr.encoding); - select = - (function - | Manager (Tx_rollup_finalize_commitment _ as op) -> Some op - | _ -> None); - proj = - (function Tx_rollup_finalize_commitment {tx_rollup} -> tx_rollup); - inj = (fun tx_rollup -> Tx_rollup_finalize_commitment {tx_rollup}); - } - - let tx_rollup_remove_commitment_case = - MCase - { - tag = tx_rollup_operation_remove_commitment_tag; - name = "tx_rollup_remove_commitment"; - encoding = obj1 (req "rollup" Tx_rollup_repr.encoding); - select = - (function - | Manager (Tx_rollup_remove_commitment _ as op) -> Some op - | _ -> None); - proj = - (function Tx_rollup_remove_commitment {tx_rollup} -> tx_rollup); - inj = (fun tx_rollup -> Tx_rollup_remove_commitment {tx_rollup}); - } - - let tx_rollup_rejection_case = - MCase - { - tag = tx_rollup_operation_rejection_tag; - name = "tx_rollup_rejection"; - encoding = - 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.serialized_encoding); - select = - (function - | Manager (Tx_rollup_rejection _ as op) -> Some op | _ -> None); - proj = - (function - | Tx_rollup_rejection - { - tx_rollup; - level; - message; - message_position; - message_path; - message_result_hash; - message_result_path; - previous_message_result; - previous_message_result_path; - proof; - } -> - ( tx_rollup, - level, - 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, - level, - message, - message_position, - message_path, - message_result_hash, - message_result_path, - previous_message_result, - previous_message_result_path, - proof ) -> - Tx_rollup_rejection - { - tx_rollup; - level; - message; - message_position = Z.to_int message_position; - message_path; - message_result_hash; - message_result_path; - previous_message_result; - previous_message_result_path; - proof; - }); - } - - let tx_rollup_dispatch_tickets_case = - MCase - { - tag = tx_rollup_operation_dispatch_tickets_tag; - name = "tx_rollup_dispatch_tickets"; - encoding = - 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)); - select = - (function - | Manager (Tx_rollup_dispatch_tickets _ as op) -> Some op - | _ -> None); - proj = - (function - | Tx_rollup_dispatch_tickets - { - 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, - message_result_path, - tickets_info ) -> - Tx_rollup_dispatch_tickets - { - tx_rollup; - level; - context_hash; - message_index; - message_result_path; - tickets_info; - }); - } - let transfer_ticket_case = MCase { @@ -1667,46 +1371,6 @@ module Encoding = struct let update_consensus_key_case = make_manager_case 114 Manager_operations.update_consensus_key_case - let tx_rollup_origination_case = - make_manager_case - tx_rollup_operation_tag_offset - Manager_operations.tx_rollup_origination_case - - let tx_rollup_submit_batch_case = - make_manager_case - tx_rollup_operation_submit_batch_tag - Manager_operations.tx_rollup_submit_batch_case - - let tx_rollup_commit_case = - make_manager_case - tx_rollup_operation_commit_tag - Manager_operations.tx_rollup_commit_case - - let tx_rollup_return_bond_case = - make_manager_case - tx_rollup_operation_return_bond_tag - Manager_operations.tx_rollup_return_bond_case - - let tx_rollup_finalize_commitment_case = - make_manager_case - tx_rollup_operation_finalize_commitment_tag - Manager_operations.tx_rollup_finalize_commitment_case - - let tx_rollup_remove_commitment_case = - make_manager_case - tx_rollup_operation_remove_commitment_tag - Manager_operations.tx_rollup_remove_commitment_case - - let tx_rollup_rejection_case = - make_manager_case - tx_rollup_operation_rejection_tag - Manager_operations.tx_rollup_rejection_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 transfer_ticket_tag @@ -1797,14 +1461,6 @@ module Encoding = struct PCase drain_delegate_case; PCase failing_noop_case; PCase register_global_constant_case; - PCase tx_rollup_origination_case; - PCase tx_rollup_submit_batch_case; - PCase tx_rollup_commit_case; - PCase tx_rollup_return_bond_case; - PCase tx_rollup_finalize_commitment_case; - PCase tx_rollup_remove_commitment_case; - PCase tx_rollup_rejection_case; - PCase tx_rollup_dispatch_tickets_case; PCase transfer_ticket_case; PCase dal_publish_slot_header_case; PCase sc_rollup_originate_case; @@ -2190,22 +1846,6 @@ let equal_manager_operation_kind : | Increase_paid_storage _, _ -> None | Update_consensus_key _, Update_consensus_key _ -> Some Eq | Update_consensus_key _, _ -> None - | Tx_rollup_origination, Tx_rollup_origination -> Some Eq - | Tx_rollup_origination, _ -> None - | Tx_rollup_submit_batch _, Tx_rollup_submit_batch _ -> Some Eq - | Tx_rollup_submit_batch _, _ -> None - | Tx_rollup_commit _, Tx_rollup_commit _ -> Some Eq - | Tx_rollup_commit _, _ -> None - | Tx_rollup_return_bond _, Tx_rollup_return_bond _ -> Some Eq - | Tx_rollup_return_bond _, _ -> None - | Tx_rollup_finalize_commitment _, Tx_rollup_finalize_commitment _ -> Some Eq - | Tx_rollup_finalize_commitment _, _ -> None - | Tx_rollup_remove_commitment _, Tx_rollup_remove_commitment _ -> Some Eq - | Tx_rollup_remove_commitment _, _ -> None - | Tx_rollup_rejection _, Tx_rollup_rejection _ -> Some Eq - | Tx_rollup_rejection _, _ -> None - | Tx_rollup_dispatch_tickets _, Tx_rollup_dispatch_tickets _ -> Some Eq - | Tx_rollup_dispatch_tickets _, _ -> None | Transfer_ticket _, Transfer_ticket _ -> Some Eq | Transfer_ticket _, _ -> None | Dal_publish_slot_header _, Dal_publish_slot_header _ -> Some Eq diff --git a/src/proto_alpha/lib_protocol/operation_repr.mli b/src/proto_alpha/lib_protocol/operation_repr.mli index f60d5e3516ef..91e773539eb7 100644 --- a/src/proto_alpha/lib_protocol/operation_repr.mli +++ b/src/proto_alpha/lib_protocol/operation_repr.mli @@ -43,11 +43,6 @@ - origination - delegation - set deposits limitation - - tx rollup origination - - tx rollup batch submission - - tx rollup commit - - tx rollup withdraw - - tx rollup reveal withdrawals - smart rollup origination - smart rollup add messages - smart rollup publish @@ -123,22 +118,6 @@ module Kind : sig type register_global_constant = Register_global_constant_kind - type tx_rollup_origination = Tx_rollup_origination_kind - - type tx_rollup_submit_batch = Tx_rollup_submit_batch_kind - - type tx_rollup_commit = Tx_rollup_commit_kind - - type tx_rollup_return_bond = Tx_rollup_return_bond_kind - - type tx_rollup_finalize_commitment = Tx_rollup_finalize_commitment_kind - - type tx_rollup_remove_commitment = Tx_rollup_remove_commitment_kind - - type tx_rollup_rejection = Tx_rollup_rejection_kind - - type tx_rollup_dispatch_tickets = Tx_rollup_dispatch_tickets_kind - type transfer_ticket = Transfer_ticket_kind type dal_publish_slot_header = Dal_publish_slot_header_kind @@ -176,17 +155,6 @@ module Kind : sig | Set_deposits_limit_manager_kind : set_deposits_limit manager | Increase_paid_storage_manager_kind : increase_paid_storage manager | Update_consensus_key_manager_kind : update_consensus_key manager - | Tx_rollup_origination_manager_kind : tx_rollup_origination manager - | Tx_rollup_submit_batch_manager_kind : tx_rollup_submit_batch manager - | Tx_rollup_commit_manager_kind : tx_rollup_commit manager - | Tx_rollup_return_bond_manager_kind : tx_rollup_return_bond manager - | Tx_rollup_finalize_commitment_manager_kind - : tx_rollup_finalize_commitment manager - | Tx_rollup_remove_commitment_manager_kind - : tx_rollup_remove_commitment manager - | Tx_rollup_rejection_manager_kind : tx_rollup_rejection manager - | Tx_rollup_dispatch_tickets_manager_kind - : tx_rollup_dispatch_tickets manager | Transfer_ticket_manager_kind : transfer_ticket manager | Dal_publish_slot_header_manager_kind : dal_publish_slot_header manager | Sc_rollup_originate_manager_kind : sc_rollup_originate manager @@ -423,70 +391,14 @@ and _ manager_operation = | Update_consensus_key : Signature.Public_key.t -> Kind.update_consensus_key manager_operation - (* [Tx_rollup_origination] allows an implicit contract to originate - a new transactional rollup. *) - | Tx_rollup_origination : Kind.tx_rollup_origination manager_operation - (* [Tx_rollup_submit_batch] allows to submit batches of L2 operations on a - transactional rollup. The content is a string, but stands for an immutable - byte sequence. *) - | Tx_rollup_submit_batch : { - tx_rollup : Tx_rollup_repr.t; - content : string; - burn_limit : Tez_repr.t option; - } - -> Kind.tx_rollup_submit_batch manager_operation - | Tx_rollup_commit : { - tx_rollup : Tx_rollup_repr.t; - commitment : Tx_rollup_commitment_repr.Full.t; - } - -> Kind.tx_rollup_commit manager_operation - | Tx_rollup_return_bond : { - tx_rollup : Tx_rollup_repr.t; - } - -> Kind.tx_rollup_return_bond manager_operation - | Tx_rollup_finalize_commitment : { - tx_rollup : Tx_rollup_repr.t; - } - -> Kind.tx_rollup_finalize_commitment manager_operation - | Tx_rollup_remove_commitment : { - tx_rollup : Tx_rollup_repr.t; - } - -> Kind.tx_rollup_remove_commitment manager_operation - | Tx_rollup_rejection : { - tx_rollup : Tx_rollup_repr.t; - level : Tx_rollup_level_repr.t; - 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.serialized; - } - -> Kind.tx_rollup_rejection manager_operation - | Tx_rollup_dispatch_tickets : { - tx_rollup : Tx_rollup_repr.t; - (** The rollup from where the tickets are retrieved *) - level : Tx_rollup_level_repr.t; - (** The level at which the withdrawal was enabled *) - context_hash : Context_hash.t; - (** The hash of the l2 context resulting from the execution of the - 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 (** [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]. + 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]. *) + 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; @@ -785,26 +697,6 @@ module Encoding : sig val increase_paid_storage_case : Kind.increase_paid_storage Kind.manager case - val tx_rollup_origination_case : Kind.tx_rollup_origination Kind.manager case - - val tx_rollup_submit_batch_case : - Kind.tx_rollup_submit_batch Kind.manager case - - val tx_rollup_commit_case : Kind.tx_rollup_commit Kind.manager case - - val tx_rollup_return_bond_case : Kind.tx_rollup_return_bond Kind.manager case - - val tx_rollup_finalize_commitment_case : - Kind.tx_rollup_finalize_commitment Kind.manager case - - val tx_rollup_remove_commitment_case : - Kind.tx_rollup_remove_commitment Kind.manager case - - val tx_rollup_rejection_case : Kind.tx_rollup_rejection Kind.manager case - - val tx_rollup_dispatch_tickets_case : - Kind.tx_rollup_dispatch_tickets Kind.manager case - val transfer_ticket_case : Kind.transfer_ticket Kind.manager case val dal_publish_slot_header_case : @@ -865,23 +757,6 @@ module Encoding : sig val increase_paid_storage_case : Kind.increase_paid_storage case - val tx_rollup_origination_case : Kind.tx_rollup_origination case - - val tx_rollup_submit_batch_case : Kind.tx_rollup_submit_batch case - - val tx_rollup_commit_case : Kind.tx_rollup_commit case - - val tx_rollup_return_bond_case : Kind.tx_rollup_return_bond case - - val tx_rollup_finalize_commitment_case : - Kind.tx_rollup_finalize_commitment case - - val tx_rollup_remove_commitment_case : Kind.tx_rollup_remove_commitment case - - val tx_rollup_rejection_case : Kind.tx_rollup_rejection case - - val tx_rollup_dispatch_tickets_case : Kind.tx_rollup_dispatch_tickets case - val transfer_ticket_case : Kind.transfer_ticket case val dal_publish_slot_header_case : Kind.dal_publish_slot_header case diff --git a/src/proto_alpha/lib_protocol/test/helpers/block.ml b/src/proto_alpha/lib_protocol/test/helpers/block.ml index d3844550952c..99b165f14e02 100644 --- a/src/proto_alpha/lib_protocol/test/helpers/block.ml +++ b/src/proto_alpha/lib_protocol/test/helpers/block.ml @@ -882,16 +882,10 @@ let bake_n_with_all_balance_updates ?(baking_mode = Application) ?policy | Transaction_result (Transaction_to_sc_rollup_result _) | Reveal_result _ | Delegation_result _ | Update_consensus_key_result _ | Set_deposits_limit_result _ - | Tx_rollup_origination_result _ | Tx_rollup_submit_batch_result _ - | Tx_rollup_commit_result _ | Tx_rollup_return_bond_result _ - | Tx_rollup_finalize_commitment_result _ - | Tx_rollup_remove_commitment_result _ - | Tx_rollup_rejection_result _ | Transfer_ticket_result _ - | Tx_rollup_dispatch_tickets_result _ - | Dal_publish_slot_header_result _ | Sc_rollup_originate_result _ - | Sc_rollup_add_messages_result _ | Sc_rollup_cement_result _ - | Sc_rollup_publish_result _ | Sc_rollup_refute_result _ - | Sc_rollup_timeout_result _ + | Transfer_ticket_result _ | Dal_publish_slot_header_result _ + | Sc_rollup_originate_result _ | Sc_rollup_add_messages_result _ + | Sc_rollup_cement_result _ | Sc_rollup_publish_result _ + | Sc_rollup_refute_result _ | Sc_rollup_timeout_result _ | Sc_rollup_execute_outbox_message_result _ | Sc_rollup_recover_bond_result _ | Zk_rollup_origination_result _ | Zk_rollup_publish_result _ | Zk_rollup_update_result _ -> @@ -928,14 +922,6 @@ let bake_n_with_origination_results ?(baking_mode = Application) ?policy n b = | Successful_manager_result (Register_global_constant_result _) | Successful_manager_result (Set_deposits_limit_result _) | Successful_manager_result (Increase_paid_storage_result _) - | Successful_manager_result (Tx_rollup_origination_result _) - | Successful_manager_result (Tx_rollup_submit_batch_result _) - | Successful_manager_result (Tx_rollup_commit_result _) - | Successful_manager_result (Tx_rollup_return_bond_result _) - | Successful_manager_result (Tx_rollup_finalize_commitment_result _) - | Successful_manager_result (Tx_rollup_remove_commitment_result _) - | Successful_manager_result (Tx_rollup_rejection_result _) - | Successful_manager_result (Tx_rollup_dispatch_tickets_result _) | Successful_manager_result (Transfer_ticket_result _) | Successful_manager_result (Dal_publish_slot_header_result _) | Successful_manager_result (Sc_rollup_originate_result _) diff --git a/src/proto_alpha/lib_protocol/test/integration/validate/test_sanity.ml b/src/proto_alpha/lib_protocol/test/integration/validate/test_sanity.ml index 69b59459fa4e..e0b900b8c105 100644 --- a/src/proto_alpha/lib_protocol/test/integration/validate/test_sanity.ml +++ b/src/proto_alpha/lib_protocol/test/integration/validate/test_sanity.ml @@ -83,13 +83,9 @@ let ensure_kind infos kind = return_unit | ( ( Transaction _ | Origination _ | Register_global_constant _ | Delegation _ | Set_deposits_limit _ | Update_consensus_key _ - | Increase_paid_storage _ | Reveal _ | Tx_rollup_origination - | Tx_rollup_submit_batch _ | Tx_rollup_commit _ - | Tx_rollup_return_bond _ | Tx_rollup_finalize_commitment _ - | Tx_rollup_remove_commitment _ | Tx_rollup_dispatch_tickets _ - | Transfer_ticket _ | Tx_rollup_rejection _ | Sc_rollup_originate _ - | Sc_rollup_publish _ | Sc_rollup_cement _ | Sc_rollup_add_messages _ - | Sc_rollup_refute _ | Sc_rollup_timeout _ + | Increase_paid_storage _ | Reveal _ | Transfer_ticket _ + | Sc_rollup_originate _ | Sc_rollup_publish _ | Sc_rollup_cement _ + | Sc_rollup_add_messages _ | Sc_rollup_refute _ | Sc_rollup_timeout _ | Sc_rollup_execute_outbox_message _ | Sc_rollup_recover_bond _ | Dal_publish_slot_header _ | Zk_rollup_origination _ | Zk_rollup_publish _ | Zk_rollup_update _ ), diff --git a/src/proto_alpha/lib_protocol/validate.ml b/src/proto_alpha/lib_protocol/validate.ml index b612393f3aa1..2da01eec3d82 100644 --- a/src/proto_alpha/lib_protocol/validate.ml +++ b/src/proto_alpha/lib_protocol/validate.ml @@ -1991,16 +1991,6 @@ module Manager = struct && storage_limit >= Z.zero) Fees.Storage_limit_too_high - let assert_tx_rollup_feature_enabled vi = - let open Result_syntax in - let* sunset = - Raw_level.of_int32 (Constants.tx_rollup_sunset_level vi.ctxt) - in - error_unless - (Constants.tx_rollup_enable vi.ctxt - && Raw_level.(vi.current_level.level < sunset)) - Tx_rollup_feature_disabled - let assert_sc_rollup_feature_enabled vi = error_unless (Constants.sc_rollup_enable vi.ctxt) Sc_rollup_feature_disabled @@ -2030,85 +2020,6 @@ module Manager = struct cost is estimated from the size of its bytes. *) Script.consume_decoding_gas remaining_gas lexpr - let validate_tx_rollup_submit_batch vi remaining_gas content = - let open Result_syntax in - let* () = assert_tx_rollup_feature_enabled vi in - let _message, message_size = Tx_rollup_message.make_batch content in - let* cost = Tx_rollup_gas.hash_cost message_size in - let size_limit = Constants.tx_rollup_hard_size_limit_per_message vi.ctxt in - let* (_ : Gas.Arith.fp) = Gas.consume_from remaining_gas cost in - error_unless - Compare.Int.(message_size <= size_limit) - Tx_rollup_errors.Message_size_exceeds_limit - - let validate_tx_rollup_dispatch_tickets vi remaining_gas operation = - let open Result_syntax in - let* () = assert_tx_rollup_feature_enabled vi in - let (Tx_rollup_dispatch_tickets {tickets_info; message_result_path; _}) = - operation - in - let Constants.Parametric. - {max_messages_per_inbox; max_withdrawals_per_batch; _} = - Constants.tx_rollup vi.ctxt - in - let* () = - Tx_rollup_errors.check_path_depth - `Commitment - (Tx_rollup_commitment.Merkle.path_depth message_result_path) - ~count_limit:max_messages_per_inbox - in - let* () = - error_when - Compare.List_length_with.(tickets_info = 0) - Tx_rollup_errors.No_withdrawals_to_dispatch - in - let* () = - error_when - Compare.List_length_with.(tickets_info > max_withdrawals_per_batch) - Tx_rollup_errors.Too_many_withdrawals - in - let* (_ : Gas.Arith.fp) = - record_trace - Gas_quota_exceeded_init_deserialize - (List.fold_left_e - (fun remaining_gas Tx_rollup_reveal.{contents; ty; _} -> - let* remaining_gas = - Script.consume_decoding_gas remaining_gas contents - in - Script.consume_decoding_gas remaining_gas ty) - remaining_gas - tickets_info) - in - return_unit - - let validate_tx_rollup_rejection vi operation = - let open Result_syntax in - let* () = assert_tx_rollup_feature_enabled vi in - let (Tx_rollup_rejection - {message_path; message_result_path; previous_message_result_path; _}) - = - operation - in - let Constants.Parametric.{max_messages_per_inbox; _} = - Constants.tx_rollup vi.ctxt - in - let* () = - Tx_rollup_errors.check_path_depth - `Inbox - (Tx_rollup_inbox.Merkle.path_depth message_path) - ~count_limit:max_messages_per_inbox - in - let* () = - Tx_rollup_errors.check_path_depth - `Commitment - (Tx_rollup_commitment.Merkle.path_depth message_result_path) - ~count_limit:max_messages_per_inbox - in - Tx_rollup_errors.check_path_depth - `Commitment - (Tx_rollup_commitment.Merkle.path_depth previous_message_result_path) - ~count_limit:max_messages_per_inbox - let may_trace_gas_limit_too_high info = match info.mode with | Application _ | Partial_validation _ | Construction _ -> fun x -> x @@ -2179,19 +2090,10 @@ module Manager = struct | Update_consensus_key pk -> Delegate.Consensus_key.check_not_tz4 pk | Delegation None | Set_deposits_limit _ | Increase_paid_storage _ -> return_unit - | Tx_rollup_origination -> assert_tx_rollup_feature_enabled vi - | Tx_rollup_submit_batch {content; _} -> - validate_tx_rollup_submit_batch vi remaining_gas content - | Tx_rollup_commit _ | Tx_rollup_return_bond _ - | Tx_rollup_finalize_commitment _ | Tx_rollup_remove_commitment _ -> - assert_tx_rollup_feature_enabled vi | Transfer_ticket {contents; ty; _} -> let* remaining_gas = consume_decoding_gas remaining_gas contents in let* (_ : Gas.Arith.fp) = consume_decoding_gas remaining_gas ty in return_unit - | Tx_rollup_dispatch_tickets _ -> - validate_tx_rollup_dispatch_tickets vi remaining_gas operation - | Tx_rollup_rejection _ -> validate_tx_rollup_rejection vi operation | Sc_rollup_originate {kind; _} -> let* () = assert_sc_rollup_feature_enabled vi in assert_pvm_kind_enabled vi kind diff --git a/src/proto_alpha/lib_sc_rollup_node/daemon.ml b/src/proto_alpha/lib_sc_rollup_node/daemon.ml index 1fdbd511fdb7..15666928f27c 100644 --- a/src/proto_alpha/lib_sc_rollup_node/daemon.ml +++ b/src/proto_alpha/lib_sc_rollup_node/daemon.ml @@ -233,10 +233,7 @@ module Make (PVM : Pvm.S) = struct | Dal_publish_slot_header _ -> true | Reveal _ | Transaction _ | Origination _ | Delegation _ | Update_consensus_key _ | Register_global_constant _ - | Set_deposits_limit _ | Increase_paid_storage _ | Tx_rollup_origination - | Tx_rollup_submit_batch _ | Tx_rollup_commit _ | Tx_rollup_return_bond _ - | Tx_rollup_finalize_commitment _ | Tx_rollup_remove_commitment _ - | Tx_rollup_rejection _ | Tx_rollup_dispatch_tickets _ | Transfer_ticket _ + | Set_deposits_limit _ | Increase_paid_storage _ | Transfer_ticket _ | Sc_rollup_originate _ | Zk_rollup_origination _ | Zk_rollup_publish _ | Zk_rollup_update _ -> false -- GitLab