diff --git a/devtools/get_contracts/get_contracts_alpha.ml b/devtools/get_contracts/get_contracts_alpha.ml index 8035715ad0c1e3bd93aa0af5ce17fd902f01a4b1..7f1d4ba9249f168751549610ca963255b1295edc 100644 --- a/devtools/get_contracts/get_contracts_alpha.ml +++ b/devtools/get_contracts/get_contracts_alpha.ml @@ -235,7 +235,7 @@ module Proto = struct | Big_map_t _ | Contract_t _ | Operation_t | Sapling_transaction_t _ | Sapling_transaction_deprecated_t _ | Sapling_state_t _ | Never_t | Bls12_381_g1_t | Bls12_381_g2_t | Bls12_381_fr_t | Ticket_t _ - | Chain_id_t | Chest_key_t | Chest_t | Tx_rollup_l2_address_t -> + | Chain_id_t | Chest_key_t | Chest_t -> [] | Pair_t (t1, t2, _, _) -> let g1 = List.map (fun g (v, _) -> g v) @@ find_lambda_tys t1 in diff --git a/docs/alpha/michelson.rst b/docs/alpha/michelson.rst index 252eebc12bf20d7197b8d5049bfd385c43924d2b..cd9228063c2d47befe480a2f1a14e573d678e5b6 100644 --- a/docs/alpha/michelson.rst +++ b/docs/alpha/michelson.rst @@ -747,8 +747,6 @@ Domain specific data types - ``chest_key``: used to open a chest, also contains a proof to check the correctness of the opening. see :doc:`Timelock ` . -- ``tx_rollup_l2_address``: An address used to identify an account in a transaction rollup ledger. It is the hash of a BLS public key, used to authenticate layer-2 operations to transfer tickets from this account. - Domain specific operations -------------------------- @@ -1196,8 +1194,8 @@ Events :: 'ty : 'S -> operation : 'S -Removed instructions -~~~~~~~~~~~~~~~~~~~~ +Removed instructions and types +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :doc:`../protocols/005_babylon` deprecated the following instructions. Because no smart contract used these on Mainnet before they got deprecated, they have been @@ -1235,7 +1233,15 @@ parameter if the sender is the contract's manager. :: 'S -> nat : 'S -.. _MichelsonViews_alpha: +:doc:`../protocols/016_mumbai` deprecated the following +type. Because no smart contract used it on Mainnet before it got +deprecated, it has been removed. The Michelson type-checker will +reject any contract using it. + +- ``tx_rollup_l2_address``: An address used to identify an account in + a transaction rollup ledger. It is the hash of a BLS public key, + used to authenticate layer-2 operations to transfer tickets from + this account. Operations on views ~~~~~~~~~~~~~~~~~~~~ @@ -2692,7 +2698,6 @@ Full grammar | signature | timestamp | address - | tx_rollup_l2_address | option | or | pair ... diff --git a/docs/protocols/alpha.rst b/docs/protocols/alpha.rst index b719b991cb29e4cc913f1dc71275ddbfc46207ec..66401eb169ec53969e7feef133f1c4cbc3736854 100644 --- a/docs/protocols/alpha.rst +++ b/docs/protocols/alpha.rst @@ -53,3 +53,6 @@ Internal (MR :gl:`!8128`) - split smart rollup origination fct for readibility. (MR :gl:`!8276`) + +- Remove the deprecated and unused ``tx_rollup_l2_address`` Michelson + type. (MR :gl:`!8546`) diff --git a/src/proto_alpha/lib_benchmark/michelson_samplers.ml b/src/proto_alpha/lib_benchmark/michelson_samplers.ml index 0bad66b9794432d338d5ab0d7dd7b2a52f2373cd..1b4d793b1795eb3e7b399bc1b7755470f020ebae 100644 --- a/src/proto_alpha/lib_benchmark/michelson_samplers.ml +++ b/src/proto_alpha/lib_benchmark/michelson_samplers.ml @@ -630,9 +630,6 @@ end) | Bls12_381_g2_t -> generate_bls12_381_g2 | Bls12_381_fr_t -> generate_bls12_381_fr | Ticket_t (contents_ty, _) -> generate_ticket contents_ty - | Tx_rollup_l2_address_t -> - fail_sampling - "Michelson_samplers: tx_rollup_l2_address is deprecated" | Sapling_transaction_t _ -> fail_sampling "Michelson_samplers: sapling transactions not handled yet" diff --git a/src/proto_alpha/lib_benchmark/test/test_distribution.ml b/src/proto_alpha/lib_benchmark/test/test_distribution.ml index 8c9e46c21fc77c850f09f2d266dc27f401ebf9a3..e7922c448ab6c906692a974431b8593546837000 100644 --- a/src/proto_alpha/lib_benchmark/test/test_distribution.ml +++ b/src/proto_alpha/lib_benchmark/test/test_distribution.ml @@ -64,7 +64,6 @@ let rec tnames_of_type : | Script_typed_ir.Key_t -> `TKey :: acc | Script_typed_ir.Timestamp_t -> `TTimestamp :: acc | Script_typed_ir.Address_t -> `TAddress :: acc - | Script_typed_ir.Tx_rollup_l2_address_t -> assert false | Script_typed_ir.Bool_t -> `TBool :: acc | Script_typed_ir.Pair_t (lty, rty, _, _) -> tnames_of_type lty (tnames_of_type rty (`TPair :: acc)) diff --git a/src/proto_alpha/lib_plugin/RPC.ml b/src/proto_alpha/lib_plugin/RPC.ml index 128df48c1f4d33389d255d060e3b0d72b97b2488..afac7f99ca1b2afff77b58d4751d599eb34d4ace 100644 --- a/src/proto_alpha/lib_plugin/RPC.ml +++ b/src/proto_alpha/lib_plugin/RPC.ml @@ -633,7 +633,6 @@ module Scripts = struct | Key_t -> return (T_key, [], []) | Timestamp_t -> return (T_timestamp, [], []) | Address_t -> return (T_address, [], []) - | Tx_rollup_l2_address_t -> return (T_tx_rollup_l2_address, [], []) | Operation_t -> return (T_operation, [], []) | Chain_id_t -> return (T_chain_id, [], []) | Never_t -> return (T_never, [], []) diff --git a/src/proto_alpha/lib_protocol/gas_comparable_input_size.ml b/src/proto_alpha/lib_protocol/gas_comparable_input_size.ml index d5b8121dcb71156e2e19b41a58287712a06fd478..f916a29849fbefc78ad765d1d8d9733fc053e44e 100644 --- a/src/proto_alpha/lib_protocol/gas_comparable_input_size.ml +++ b/src/proto_alpha/lib_protocol/gas_comparable_input_size.ml @@ -99,9 +99,6 @@ let address (addr : Script_typed_ir.address) : t = Signature.Public_key_hash.size + String.length (Alpha_context.Entrypoint.to_string entrypoint) -let tx_rollup_l2_address x = - Tx_rollup_l2_address.Indexable.size @@ Indexable.forget x - let timestamp (tstamp : Script_timestamp.t) : t = Z.numbits (Script_timestamp.to_zint tstamp) / 8 @@ -120,7 +117,6 @@ let rec size_of_comparable_value : | Key_hash_t -> key_hash v | Timestamp_t -> timestamp v | Address_t -> address v - | Tx_rollup_l2_address_t -> tx_rollup_l2_address v | Pair_t (leaf, node, _, YesYes) -> let lv, rv = v in let size = diff --git a/src/proto_alpha/lib_protocol/michelson_v1_gas.ml b/src/proto_alpha/lib_protocol/michelson_v1_gas.ml index dbbdf5b35bf3db4480a889c29304d2940a2aed3e..f53c4be85e3c72f41cf401583e45082cb59c8d8a 100644 --- a/src/proto_alpha/lib_protocol/michelson_v1_gas.ml +++ b/src/proto_alpha/lib_protocol/michelson_v1_gas.ml @@ -514,10 +514,6 @@ module Cost_of = struct let sz = Signature.Public_key_hash.size + entrypoint_size in atomic_step_cost (cost_N_ICompare sz sz) - (** TODO: https://gitlab.com/tezos/tezos/-/issues/2340 - Refine the gas model *) - let compare_tx_rollup_l2_address = atomic_step_cost (cost_N_ICompare 48 48) - let compare_chain_id = atomic_step_cost (S.safe_int 30) (* Defunctionalized CPS *) @@ -546,8 +542,6 @@ module Cost_of = struct | Timestamp_t -> (apply [@tailcall]) Gas.(acc +@ compare_timestamp x y) k | Address_t -> (apply [@tailcall]) Gas.(acc +@ compare_address) k - | Tx_rollup_l2_address_t -> - (apply [@tailcall]) Gas.(acc +@ compare_tx_rollup_l2_address) k | Chain_id_t -> (apply [@tailcall]) Gas.(acc +@ compare_chain_id) k | Pair_t (tl, tr, _, YesYes) -> (* Reasonable over-approximation of the cost of lexicographic comparison. *) @@ -839,10 +833,6 @@ module Cost_of = struct let timestamp_readable s = atomic_step_cost (cost_TIMESTAMP_READABLE_DECODING (String.length s)) - (** TODO: https://gitlab.com/tezos/tezos/-/issues/2340 - Refine the gas model *) - let tx_rollup_l2_address = bls12_381_g1 - (* Balance stored at /contracts/index/hash/balance, on 64 bits *) let contract_exists = Gas.cost_of_repr @@ Storage_costs.read_access ~path_length:4 ~read_bytes:8 @@ -953,10 +943,6 @@ module Cost_of = struct let unit = Gas.free - (** TODO: https://gitlab.com/tezos/tezos/-/issues/2340 - Refine the gas model *) - let tx_rollup_l2_address = bls12_381_g1 - (* Reuse 006 costs. *) let operation bytes = Script.bytes_node_cost bytes diff --git a/src/proto_alpha/lib_protocol/michelson_v1_gas.mli b/src/proto_alpha/lib_protocol/michelson_v1_gas.mli index 926a61d16817c04a2deb4533b10ed054912c9b55..bc804d926472de2f51088f513b6363c2a4f20024 100644 --- a/src/proto_alpha/lib_protocol/michelson_v1_gas.mli +++ b/src/proto_alpha/lib_protocol/michelson_v1_gas.mli @@ -478,8 +478,6 @@ module Cost_of : sig val timestamp_readable : string -> Gas.cost - val tx_rollup_l2_address : Gas.cost - val contract_exists : Gas.cost val proof_argument : int -> Gas.cost @@ -528,8 +526,6 @@ module Cost_of : sig val unit : Gas.cost - val tx_rollup_l2_address : Gas.cost - val operation : bytes -> Gas.cost val sapling_transaction : Sapling.transaction -> Gas.cost diff --git a/src/proto_alpha/lib_protocol/sc_rollup_operations.ml b/src/proto_alpha/lib_protocol/sc_rollup_operations.ml index 09502a249dd5c463f7b9ccabd1b8faac097bb7f7..9285af07304af53c1feefec6f01ba9ba892acd04 100644 --- a/src/proto_alpha/lib_protocol/sc_rollup_operations.ml +++ b/src/proto_alpha/lib_protocol/sc_rollup_operations.ml @@ -123,7 +123,6 @@ let rec validate_ty : | Bls12_381_fr_t -> (k [@ocaml.tailcall]) () | Bool_t -> (k [@ocaml.tailcall]) () | Never_t -> (k [@ocaml.tailcall]) () - | Tx_rollup_l2_address_t -> (k [@ocaml.tailcall]) () | Chain_id_t -> (k [@ocaml.tailcall]) () (* Valid collection types. *) | Ticket_t (ty, _) -> (validate_ty [@ocaml.tailcall]) ty no_entrypoints k diff --git a/src/proto_alpha/lib_protocol/script_comparable.ml b/src/proto_alpha/lib_protocol/script_comparable.ml index d5e9e4632f0dc08aa9796027ccd92cfabf7c57f9..5ef9466d0ba52c130b433af3f8d7de5993d040e4 100644 --- a/src/proto_alpha/lib_protocol/script_comparable.ml +++ b/src/proto_alpha/lib_protocol/script_comparable.ml @@ -34,8 +34,6 @@ let compare_address {destination = destination1; entrypoint = entrypoint1} if Compare.Int.(lres = 0) then Entrypoint.compare entrypoint1 entrypoint2 else lres -let compare_tx_rollup_l2_address = Tx_rollup_l2_address.Indexable.compare_values - type compare_comparable_cont = | Compare_comparable : 'a comparable_ty * 'a * 'a * compare_comparable_cont @@ -60,8 +58,6 @@ let compare_comparable : type a. a comparable_ty -> a -> a -> int = | Nat_t, x, y -> (apply [@tailcall]) (Script_int.compare x y) k | Timestamp_t, x, y -> (apply [@tailcall]) (Script_timestamp.compare x y) k | Address_t, x, y -> (apply [@tailcall]) (compare_address x y) k - | Tx_rollup_l2_address_t, x, y -> - (apply [@tailcall]) (compare_tx_rollup_l2_address x y) k | Bytes_t, x, y -> (apply [@tailcall]) (Compare.Bytes.compare x y) k | Chain_id_t, x, y -> (apply [@tailcall]) (Script_chain_id.compare x y) k | Pair_t (tl, tr, _, YesYes), (lx, rx), (ly, ry) -> diff --git a/src/proto_alpha/lib_protocol/script_comparable.mli b/src/proto_alpha/lib_protocol/script_comparable.mli index 70c1f809d41f82e41df1b7582b235b30a2f43ed4..8f489511625a709dca26feb925f75b0672bfc2c5 100644 --- a/src/proto_alpha/lib_protocol/script_comparable.mli +++ b/src/proto_alpha/lib_protocol/script_comparable.mli @@ -27,8 +27,3 @@ val compare_comparable : 'a Script_typed_ir.comparable_ty -> 'a -> 'a -> int val compare_address : Script_typed_ir.address -> Script_typed_ir.address -> int - -val compare_tx_rollup_l2_address : - Script_typed_ir.tx_rollup_l2_address -> - Script_typed_ir.tx_rollup_l2_address -> - int diff --git a/src/proto_alpha/lib_protocol/script_ir_translator.ml b/src/proto_alpha/lib_protocol/script_ir_translator.ml index 6ca73dc89c0f23c29bc046aca68bb855f56bbc56..674a376463ad4c9550c3e17feee533ac0ee21000 100644 --- a/src/proto_alpha/lib_protocol/script_ir_translator.ml +++ b/src/proto_alpha/lib_protocol/script_ir_translator.ml @@ -182,7 +182,7 @@ let hash_comparable_data ctxt ty data = let check_dupable_comparable_ty : type a. a comparable_ty -> unit = function | Unit_t | Never_t | Int_t | Nat_t | Signature_t | String_t | Bytes_t | Mutez_t | Bool_t | Key_hash_t | Key_t | Timestamp_t | Chain_id_t | Address_t - | Tx_rollup_l2_address_t | Pair_t _ | Or_t _ | Option_t _ -> + | Pair_t _ | Or_t _ | Option_t _ -> () let check_dupable_ty ctxt loc ty = @@ -202,7 +202,6 @@ let check_dupable_ty ctxt loc ty = | Key_t -> return_unit | Timestamp_t -> return_unit | Address_t -> return_unit - | Tx_rollup_l2_address_t -> return_unit | Bool_t -> return_unit | Contract_t _ -> return_unit | Operation_t -> return_unit @@ -345,8 +344,6 @@ let ty_eq : | Timestamp_t, _ -> not_equal () | Address_t, Address_t -> return Eq | Address_t, _ -> not_equal () - | Tx_rollup_l2_address_t, Tx_rollup_l2_address_t -> return Eq - | Tx_rollup_l2_address_t, _ -> not_equal () | Bool_t, Bool_t -> return Eq | Bool_t, _ -> not_equal () | Chain_id_t, Chain_id_t -> return Eq @@ -612,11 +609,6 @@ let rec parse_ty : check_type_annot loc annot >|? fun () -> return ctxt timestamp_t | Prim (loc, T_address, [], annot) -> check_type_annot loc annot >|? fun () -> return ctxt address_t - | Prim (loc, T_tx_rollup_l2_address, [], annot) -> - if Constants.tx_rollup_enable ctxt || legacy then - check_type_annot loc annot >|? fun () -> - return ctxt tx_rollup_l2_address_t - else error @@ Tx_rollup_addresses_disabled loc | Prim (loc, T_signature, [], annot) -> check_type_annot loc annot >|? fun () -> return ctxt signature_t | Prim (loc, T_operation, [], annot) -> @@ -827,9 +819,8 @@ let rec parse_ty : | Prim ( loc, (( T_unit | T_signature | T_int | T_nat | T_string | T_bytes | T_mutez - | T_bool | T_key | T_key_hash | T_timestamp | T_address - | T_tx_rollup_l2_address | T_chain_id | T_operation | T_never ) as - prim), + | T_bool | T_key | T_key_hash | T_timestamp | T_address | T_chain_id + | T_operation | T_never ) as prim), l, _ ) -> error (Invalid_arity (loc, prim, 0, List.length l)) @@ -841,6 +832,8 @@ let rec parse_ty : error (Invalid_arity (loc, prim, 1, List.length l)) | Prim (loc, ((T_pair | T_or | T_map | T_lambda) as prim), l, _) -> error (Invalid_arity (loc, prim, 2, List.length l)) + | Prim (_, T_tx_rollup_l2_address, _, _) -> + error @@ Deprecated_instruction T_tx_rollup_l2_address | expr -> error @@ unexpected @@ -873,7 +866,6 @@ let rec parse_ty : T_string; T_ticket; T_timestamp; - T_tx_rollup_l2_address; T_unit; ] @@ -1076,7 +1068,6 @@ let check_packable ~allow_contract loc root = | Key_t -> Result.return_unit | Timestamp_t -> Result.return_unit | Address_t -> Result.return_unit - | Tx_rollup_l2_address_t -> Result.return_unit | Bool_t -> Result.return_unit | Chain_id_t -> Result.return_unit | Never_t -> Result.return_unit @@ -1655,31 +1646,6 @@ let parse_address ctxt : Script.node -> (address * context) tzresult = | expr -> error @@ Invalid_kind (location expr, [String_kind; Bytes_kind], kind expr) -let parse_tx_rollup_l2_address ctxt : - Script.node -> (tx_rollup_l2_address * context) tzresult = function - | Bytes (loc, bytes) as expr (* As unparsed with [Optimized]. *) -> ( - Gas.consume ctxt Typecheck_costs.tx_rollup_l2_address >>? fun ctxt -> - match Tx_rollup_l2_address.of_bytes_opt bytes with - | Some txa -> ok (Tx_rollup_l2_address.Indexable.value txa, ctxt) - | None -> - error - @@ Invalid_syntactic_constant - ( loc, - strip_locations expr, - "a valid transaction rollup L2 address" )) - | String (loc, str) as expr (* As unparsed with [Readable]. *) -> ( - Gas.consume ctxt Typecheck_costs.tx_rollup_l2_address >>? fun ctxt -> - match Tx_rollup_l2_address.of_b58check_opt str with - | Some txa -> ok (Tx_rollup_l2_address.Indexable.value txa, ctxt) - | None -> - error - @@ Invalid_syntactic_constant - ( loc, - strip_locations expr, - "a valid transaction rollup L2 address" )) - | expr -> - error @@ Invalid_kind (location expr, [String_kind; Bytes_kind], kind expr) - let parse_never expr : (never * context) tzresult = error @@ Invalid_never_expr (location expr) @@ -2038,10 +2004,6 @@ let rec parse_data : assert false | Chain_id_t, expr -> Lwt.return @@ traced_no_lwt @@ parse_chain_id ctxt expr | Address_t, expr -> Lwt.return @@ traced_no_lwt @@ parse_address ctxt expr - | Tx_rollup_l2_address_t, expr -> - if Constants.tx_rollup_enable ctxt || legacy then - Lwt.return @@ traced_no_lwt @@ parse_tx_rollup_l2_address ctxt expr - else tzfail (Deprecated_instruction T_tx_rollup_l2_address) | Contract_t (arg_ty, _), expr -> traced ( parse_address ctxt expr >>?= fun (address, ctxt) -> @@ -5237,7 +5199,6 @@ let rec has_lazy_storage : type t tc. (t, tc) ty -> t has_lazy_storage = | Key_t -> False_f | Timestamp_t -> False_f | Address_t -> False_f - | Tx_rollup_l2_address_t -> False_f | Bool_t -> False_f | Lambda_t (_, _, _) -> False_f | Set_t (_, _) -> False_f diff --git a/src/proto_alpha/lib_protocol/script_ir_unparser.ml b/src/proto_alpha/lib_protocol/script_ir_unparser.ml index 5e61073b8b28c1354b30e47411e9a56cee9c62ac..1cce806a9640019aff300f880dc6e37e2028c2c6 100644 --- a/src/proto_alpha/lib_protocol/script_ir_unparser.ml +++ b/src/proto_alpha/lib_protocol/script_ir_unparser.ml @@ -57,7 +57,6 @@ let rec unparse_ty_and_entrypoints_uncarbonated : | Key_t -> (T_key, []) | Timestamp_t -> (T_timestamp, []) | Address_t -> (T_address, []) - | Tx_rollup_l2_address_t -> (T_tx_rollup_l2_address, []) | Operation_t -> (T_operation, []) | Chain_id_t -> (T_chain_id, []) | Never_t -> (T_never, []) @@ -228,23 +227,6 @@ let unparse_address ~loc ctxt mode {destination; entrypoint} = in (String (loc, notation), ctxt) -let unparse_tx_rollup_l2_address ~loc ctxt mode - (tx_address : tx_rollup_l2_address) = - let tx_address = Indexable.to_value tx_address in - match mode with - | Optimized | Optimized_legacy -> - Gas.consume ctxt Unparse_costs.contract_optimized >|? fun ctxt -> - let bytes = - Data_encoding.Binary.to_bytes_exn - Tx_rollup_l2_address.encoding - tx_address - in - (Bytes (loc, bytes), ctxt) - | Readable -> - Gas.consume ctxt Unparse_costs.contract_readable >|? fun ctxt -> - let b58check = Tx_rollup_l2_address.to_b58check tx_address in - (String (loc, b58check), ctxt) - let unparse_contract ~loc ctxt mode typed_contract = let destination = Typed_contract.destination typed_contract in let entrypoint = Typed_contract.entrypoint typed_contract in @@ -423,8 +405,6 @@ let rec unparse_comparable_data_rec : | Bool_t, b -> Lwt.return @@ unparse_bool ~loc ctxt b | Timestamp_t, t -> Lwt.return @@ unparse_timestamp ~loc ctxt mode t | Address_t, address -> Lwt.return @@ unparse_address ~loc ctxt mode address - | Tx_rollup_l2_address_t, address -> - Lwt.return @@ unparse_tx_rollup_l2_address ~loc ctxt mode address | Signature_t, s -> Lwt.return @@ unparse_signature ~loc ctxt mode s | Mutez_t, v -> Lwt.return @@ unparse_mutez ~loc ctxt v | Key_t, k -> Lwt.return @@ unparse_key ~loc ctxt mode k @@ -512,8 +492,6 @@ module Data_unparser (P : MICHELSON_PARSER) = struct | Bool_t, b -> Lwt.return @@ unparse_bool ~loc ctxt b | Timestamp_t, t -> Lwt.return @@ unparse_timestamp ~loc ctxt mode t | Address_t, address -> Lwt.return @@ unparse_address ~loc ctxt mode address - | Tx_rollup_l2_address_t, address -> - Lwt.return @@ unparse_tx_rollup_l2_address ~loc ctxt mode address | Contract_t _, contract -> Lwt.return @@ unparse_contract ~loc ctxt mode contract | Signature_t, s -> Lwt.return @@ unparse_signature ~loc ctxt mode s diff --git a/src/proto_alpha/lib_protocol/script_tc_errors.ml b/src/proto_alpha/lib_protocol/script_tc_errors.ml index 64be6905ed23723e244af9327587a69e6fd9b78e..87a58d5c117577daef8cf57590ea5da0d7a6609d 100644 --- a/src/proto_alpha/lib_protocol/script_tc_errors.ml +++ b/src/proto_alpha/lib_protocol/script_tc_errors.ml @@ -76,8 +76,6 @@ type error += Tx_rollup_invalid_ticket_amount of Z.t type error += Forbidden_zero_ticket_quantity -type error += Tx_rollup_addresses_disabled of Script.location - (* Smart-contract rollup errors *) type error += Sc_rollup_disabled of Script.location diff --git a/src/proto_alpha/lib_protocol/script_tc_errors_registration.ml b/src/proto_alpha/lib_protocol/script_tc_errors_registration.ml index 2f52f374f2f511a3578f2c6b5c3ab56af690a28d..752cae1747501c689939b280e25f71637c31f763 100644 --- a/src/proto_alpha/lib_protocol/script_tc_errors_registration.ml +++ b/src/proto_alpha/lib_protocol/script_tc_errors_registration.ml @@ -263,15 +263,6 @@ let () = Data_encoding.empty (function Forbidden_zero_ticket_quantity -> Some () | _ -> None) (fun () -> Forbidden_zero_ticket_quantity) ; - (* Tx rollup addresses disabled *) - register_error_kind - `Permanent - ~id:"michelson_v1.tx_rollup_addresses_disabled" - ~title:"Tx rollup addresses are disabled" - ~description:"Cannot parse a tx_rollup address as tx rollups are disabled." - (obj1 (req "location" Script.location_encoding)) - (function Tx_rollup_addresses_disabled loc -> Some loc | _ -> None) - (fun loc -> Tx_rollup_addresses_disabled loc) ; (* Sc rollup disabled *) register_error_kind `Permanent diff --git a/src/proto_alpha/lib_protocol/script_typed_ir.ml b/src/proto_alpha/lib_protocol/script_typed_ir.ml index 02d4b692cc92a7815bb9024a88f7975dd6da7754..c7c6935b2274522dd2fa06872e63ce0f19d46d9c 100644 --- a/src/proto_alpha/lib_protocol/script_typed_ir.ml +++ b/src/proto_alpha/lib_protocol/script_typed_ir.ml @@ -91,11 +91,6 @@ end type signature = Script_signature.t -(* TODO: https://gitlab.com/tezos/tezos/-/issues/2466 - The various attributes of this type should be checked with - appropriate testing. *) -type tx_rollup_l2_address = Tx_rollup_l2_address.Indexable.value - type ('a, 'b) pair = 'a * 'b (* We cannot call this type "or" as in Michelson because "or" is an @@ -1305,7 +1300,6 @@ and ('ty, 'comparable) ty = | Key_t : (public_key, yes) ty | Timestamp_t : (Script_timestamp.t, yes) ty | Address_t : (address, yes) ty - | Tx_rollup_l2_address_t : (tx_rollup_l2_address, yes) ty | Bool_t : (bool, yes) ty | Pair_t : ('a, 'ac) ty @@ -1747,9 +1741,6 @@ let chain_id_metadata : Script_chain_id.t ty_metadata = meta_basic let address_metadata : address ty_metadata = meta_basic -let tx_rollup_l2_address_metadata : tx_rollup_l2_address ty_metadata = - meta_basic - let sapling_transaction_metadata : Sapling.transaction ty_metadata = meta_basic let sapling_transaction_deprecated_metadata : @@ -1841,7 +1832,6 @@ let ty_metadata : type a ac. (a, ac) ty -> a ty_metadata = function | Timestamp_t -> timestamp_metadata | Chain_id_t -> chain_id_metadata | Address_t -> address_metadata - | Tx_rollup_l2_address_t -> tx_rollup_l2_address_metadata | Pair_t (_, _, meta, _) -> meta | Or_t (_, _, meta, _) -> meta | Option_t (_, meta, _) -> meta @@ -1880,7 +1870,6 @@ let is_comparable : type v c. (v, c) ty -> c dbool = function | Timestamp_t -> Yes | Chain_id_t -> Yes | Address_t -> Yes - | Tx_rollup_l2_address_t -> Yes | Pair_t (_, _, _, dand) -> dbool_of_dand dand | Or_t (_, _, _, dand) -> dbool_of_dand dand | Option_t (_, _, cmp) -> cmp @@ -1937,8 +1926,6 @@ let address_t = Address_t let bool_t = Bool_t -let tx_rollup_l2_address_t = Tx_rollup_l2_address_t - let pair_t : type a ac b bc. Script.location -> (a, ac) ty -> (b, bc) ty -> (a, b) pair ty_ex_c tzresult @@ -2277,8 +2264,8 @@ let ty_traverse = let accu = f.apply accu ty in match ty with | Unit_t | Int_t | Nat_t | Signature_t | String_t | Bytes_t | Mutez_t - | Key_hash_t | Key_t | Timestamp_t | Address_t | Tx_rollup_l2_address_t - | Bool_t | Sapling_transaction_t _ | Sapling_transaction_deprecated_t _ + | Key_hash_t | Key_t | Timestamp_t | Address_t | Bool_t + | Sapling_transaction_t _ | Sapling_transaction_deprecated_t _ | Sapling_state_t _ | Operation_t | Chain_id_t | Never_t | Bls12_381_g1_t | Bls12_381_g2_t | Bls12_381_fr_t -> (continue [@ocaml.tailcall]) accu @@ -2348,8 +2335,8 @@ let value_traverse (type t tc) (ty : (t, tc) ty) (x : t) init f = in match ty with | Unit_t | Int_t | Nat_t | Signature_t | String_t | Bytes_t | Mutez_t - | Key_hash_t | Key_t | Timestamp_t | Address_t | Tx_rollup_l2_address_t - | Bool_t | Sapling_transaction_t _ | Sapling_transaction_deprecated_t _ + | Key_hash_t | Key_t | Timestamp_t | Address_t | Bool_t + | Sapling_transaction_t _ | Sapling_transaction_deprecated_t _ | Sapling_state_t _ | Operation_t | Chain_id_t | Never_t | Bls12_381_g1_t | Bls12_381_g2_t | Bls12_381_fr_t | Chest_key_t | Chest_t | Lambda_t (_, _, _) -> diff --git a/src/proto_alpha/lib_protocol/script_typed_ir.mli b/src/proto_alpha/lib_protocol/script_typed_ir.mli index 8930f6cd54b129daa7539bc654932d4fb90fbc70..8c01f106563e7e119684fc605ea88a68740de081 100644 --- a/src/proto_alpha/lib_protocol/script_typed_ir.mli +++ b/src/proto_alpha/lib_protocol/script_typed_ir.mli @@ -92,8 +92,6 @@ end type signature = Script_signature.t -type tx_rollup_l2_address = Tx_rollup_l2_address.Indexable.value - type ('a, 'b) pair = 'a * 'b type ('a, 'b) or_ = L of 'a | R of 'b @@ -1429,7 +1427,6 @@ and ('ty, 'comparable) ty = | Key_t : (public_key, yes) ty | Timestamp_t : (Script_timestamp.t, yes) ty | Address_t : (address, yes) ty - | Tx_rollup_l2_address_t : (tx_rollup_l2_address, yes) ty | Bool_t : (bool, yes) ty | Pair_t : ('a, 'ac) ty @@ -1717,8 +1714,6 @@ val timestamp_t : Script_timestamp.t comparable_ty val address_t : address comparable_ty -val tx_rollup_l2_address_t : tx_rollup_l2_address comparable_ty - val bool_t : bool comparable_ty val pair_t : diff --git a/src/proto_alpha/lib_protocol/script_typed_ir_size.ml b/src/proto_alpha/lib_protocol/script_typed_ir_size.ml index 6cdfb0568b521ca076195b57bfe597fb2c4bb863..cd5b437ecd71d3062cb92b4a05f8d712ecb4e8dd 100644 --- a/src/proto_alpha/lib_protocol/script_typed_ir_size.ml +++ b/src/proto_alpha/lib_protocol/script_typed_ir_size.ml @@ -52,7 +52,6 @@ let ty_traverse_f = | Key_t -> ret_succ_adding accu base_basic | Timestamp_t -> ret_succ_adding accu base_basic | Address_t -> ret_succ_adding accu base_basic - | Tx_rollup_l2_address_t -> ret_succ_adding accu base_basic | Bool_t -> ret_succ_adding accu base_basic | Operation_t -> ret_succ_adding accu base_basic | Chain_id_t -> ret_succ_adding accu base_basic @@ -153,9 +152,6 @@ let address_size addr = +! destination_size addr.destination +! Entrypoint.in_memory_size addr.entrypoint -let tx_rollup_l2_address_size (tx : tx_rollup_l2_address) = - Tx_rollup_l2_address.Indexable.in_memory_size @@ Indexable.forget tx - let view_signature_size (View_signature {name; input_ty; output_ty}) = ret_adding (ty_size input_ty ++ ty_size output_ty) @@ -280,8 +276,6 @@ let rec value_size : | Key_t -> ret_succ_adding accu (public_key_size x) | Timestamp_t -> ret_succ_adding accu (timestamp_size x) | Address_t -> ret_succ_adding accu (address_size x) - | Tx_rollup_l2_address_t -> - ret_succ_adding accu (tx_rollup_l2_address_size x) | Bool_t -> ret_succ accu | Pair_t (_, _, _, _) -> ret_succ_adding accu h2w | Or_t (_, _, _, _) -> ret_succ_adding accu h1w diff --git a/src/proto_alpha/lib_protocol/test/pbt/test_script_comparison.ml b/src/proto_alpha/lib_protocol/test/pbt/test_script_comparison.ml index 6319854c71c95ab86969d47eed8ffe743cf75a77..90d0b24f8d1db445db52235661e2d77b41c4709b 100644 --- a/src/proto_alpha/lib_protocol/test/pbt/test_script_comparison.ml +++ b/src/proto_alpha/lib_protocol/test/pbt/test_script_comparison.ml @@ -64,8 +64,6 @@ let rec reference_compare_comparable : type a. a comparable_ty -> a -> a -> int | Timestamp_t, x, y -> normalize_compare @@ Script_timestamp.compare x y | Address_t, x, y -> normalize_compare @@ Script_comparable.compare_address x y - | Tx_rollup_l2_address_t, x, y -> - normalize_compare @@ Script_comparable.compare_tx_rollup_l2_address x y | Bytes_t, x, y -> normalize_compare @@ Compare.Bytes.compare x y | Chain_id_t, x, y -> normalize_compare @@ Script_chain_id.compare x y | Pair_t (tl, tr, _, YesYes), (lx, rx), (ly, ry) -> diff --git a/src/proto_alpha/lib_protocol/ticket_scanner.ml b/src/proto_alpha/lib_protocol/ticket_scanner.ml index c55a5ffd362a5d5e21012fef446e1d477ba36099..7a0fb1b926bfeab59afec4d65f77428f67f6fa8b 100644 --- a/src/proto_alpha/lib_protocol/ticket_scanner.ml +++ b/src/proto_alpha/lib_protocol/ticket_scanner.ml @@ -125,7 +125,6 @@ module Ticket_inspection = struct | Timestamp_t -> (k [@ocaml.tailcall]) False_ht | Chain_id_t -> (k [@ocaml.tailcall]) False_ht | Address_t -> (k [@ocaml.tailcall]) False_ht - | Tx_rollup_l2_address_t -> (k [@ocaml.tailcall]) False_ht | Pair_t (_, _, _, YesYes) -> (k [@ocaml.tailcall]) False_ht | Or_t (_, _, _, YesYes) -> (k [@ocaml.tailcall]) False_ht | Option_t (_, _, Yes) -> (k [@ocaml.tailcall]) False_ht @@ -163,7 +162,6 @@ module Ticket_inspection = struct | Key_t -> (k [@ocaml.tailcall]) False_ht | Timestamp_t -> (k [@ocaml.tailcall]) False_ht | Address_t -> (k [@ocaml.tailcall]) False_ht - | Tx_rollup_l2_address_t -> (k [@ocaml.tailcall]) False_ht | Bool_t -> (k [@ocaml.tailcall]) False_ht | Pair_t (ty1, ty2, _, _) -> (has_tickets_of_pair [@ocaml.tailcall]) @@ -289,7 +287,6 @@ module Ticket_collection = struct | Timestamp_t -> (k [@ocaml.tailcall]) ctxt acc | Chain_id_t -> (k [@ocaml.tailcall]) ctxt acc | Address_t -> (k [@ocaml.tailcall]) ctxt acc - | Tx_rollup_l2_address_t -> (k [@ocaml.tailcall]) ctxt acc | Pair_t (_, _, _, YesYes) -> (k [@ocaml.tailcall]) ctxt acc | Or_t (_, _, _, YesYes) -> (k [@ocaml.tailcall]) ctxt acc | Option_t (_, _, Yes) -> (k [@ocaml.tailcall]) ctxt acc