diff --git a/src/proto_alpha/lib_protocol/apply.ml b/src/proto_alpha/lib_protocol/apply.ml index 2c6d40a7973b052436f745c3e460bf383d66e921..6dea5952103d59e4dfa882907784c3cfbb0434cd 100644 --- a/src/proto_alpha/lib_protocol/apply.ml +++ b/src/proto_alpha/lib_protocol/apply.ml @@ -201,13 +201,11 @@ let () = | Tx_rollup_invalid_transaction_ticket_amount -> Some () | _ -> None) (fun () -> Tx_rollup_invalid_transaction_ticket_amount) ; - let description = - "Smart contract rollups will be enabled in a future proposal." - in + let description = "Smart rollups are disabled." in register_error_kind `Permanent - ~id:"operation.sc_rollup_disabled" - ~title:"Smart contract rollups are disabled" + ~id:"operation.smart_rollup_disabled" + ~title:"Smart rollups are disabled" ~description ~pp:(fun ppf () -> Format.fprintf ppf "%s" description) Data_encoding.unit @@ -257,13 +255,13 @@ let () = (fun delegate -> Zero_frozen_deposits delegate) ; register_error_kind `Permanent - ~id:"operations.invalid_transfer_to_sc_rollup_from_implicit_account" - ~title:"Invalid transfer to sc rollup" - ~description:"Invalid transfer to sc rollup from implicit account" + ~id:"operations.invalid_transfer_to_smart_rollup_from_implicit_account" + ~title:"Invalid transfer to smart rollup" + ~description:"Invalid transfer to smart rollup from implicit account" ~pp:(fun ppf () -> Format.fprintf ppf - "Invalid source for transfer operation to smart-contract rollup. Only \ + "Invalid source for transfer operation to smart rollup. Only \ originated accounts are allowed.") Data_encoding.empty (function Invalid_transfer_to_sc_rollup -> Some () | _ -> None) diff --git a/src/proto_alpha/lib_protocol/constants_repr.ml b/src/proto_alpha/lib_protocol/constants_repr.ml index ed78dff9ab005cc65367e281c7a32bc44cdf3435..7dbac8380fef1641373c3f08de271a56cb91983e 100644 --- a/src/proto_alpha/lib_protocol/constants_repr.ml +++ b/src/proto_alpha/lib_protocol/constants_repr.ml @@ -283,24 +283,23 @@ let check_constants constants = error_unless Compare.Int.(constants.sc_rollup.origination_size >= 0) (Invalid_protocol_constants - "The smart contract rollup origination size must be non-negative.") + "The smart rollup origination size must be non-negative.") >>? fun () -> error_unless Compare.Int.(constants.sc_rollup.challenge_window_in_blocks >= 0) (Invalid_protocol_constants - "The smart contract rollup challenge window in blocks must be \ - non-negative.") + "The smart rollup challenge window in blocks must be non-negative.") >>? fun () -> error_unless Tez_repr.(constants.sc_rollup.stake_amount >= zero) (Invalid_protocol_constants - "The smart contract rollup max stake amount must be non-negative.") + "The smart rollup max stake amount must be non-negative.") >>? fun () -> error_unless Compare.Int.(constants.sc_rollup.commitment_period_in_blocks > 0) (Invalid_protocol_constants - "The smart contract rollup commitment period in blocks must be strictly \ - greater than 0.") + "The smart rollup commitment period in blocks must be strictly greater \ + than 0.") >>? fun () -> error_unless (let sc_rollup_max_lookahead_in_blocks = @@ -316,7 +315,7 @@ let check_constants constants = sc_rollup_max_lookahead_in_blocks > Int32.of_int constants.sc_rollup.challenge_window_in_blocks)) (Invalid_protocol_constants - "The smart contract rollup max lookahead in blocks must be greater than \ + "The smart rollup max lookahead in blocks must be greater than \ [sc_rollup_commitment_period_in_blocks] and \ [sc_rollup_challenge_window_in_blocks].") >>? fun () -> diff --git a/src/proto_alpha/lib_protocol/sc_rollup_arith.ml b/src/proto_alpha/lib_protocol/sc_rollup_arith.ml index 7adf0cc7a85938e6fbf9d85595aae807029d38a2..ca1ce0de7eee4fec8cac28d34c64ffe45a28c02d 100644 --- a/src/proto_alpha/lib_protocol/sc_rollup_arith.ml +++ b/src/proto_alpha/lib_protocol/sc_rollup_arith.ml @@ -63,7 +63,7 @@ let () = let msg = "Invalid claim about outbox" in register_error_kind `Permanent - ~id:"sc_rollup_arith_invalid_claim_about_outbox" + ~id:"smart_rollup_arith_invalid_claim_about_outbox" ~title:msg ~pp:(fun fmt () -> Format.pp_print_string fmt msg) ~description:msg @@ -73,7 +73,7 @@ let () = let msg = "Output proof production failed" in register_error_kind `Permanent - ~id:"sc_rollup_arith_output_proof_production_failed" + ~id:"smart_rollup_arith_output_proof_production_failed" ~title:msg ~pp:(fun fmt () -> Format.fprintf fmt "%s" msg) ~description:msg @@ -83,7 +83,7 @@ let () = let msg = "Proof production failed" in register_error_kind `Permanent - ~id:"sc_rollup_arith_proof_production_failed" + ~id:"smart_rollup_arith_proof_production_failed" ~title:msg ~pp:(fun fmt () -> Format.fprintf fmt "%s" msg) ~description:msg diff --git a/src/proto_alpha/lib_protocol/sc_rollup_dissection_chunk_repr.ml b/src/proto_alpha/lib_protocol/sc_rollup_dissection_chunk_repr.ml index 178433092f1377c7c013a82d97e0203f756cc260..e761b59a24f70e44f2958391732a5f936e28f834 100644 --- a/src/proto_alpha/lib_protocol/sc_rollup_dissection_chunk_repr.ml +++ b/src/proto_alpha/lib_protocol/sc_rollup_dissection_chunk_repr.ml @@ -164,7 +164,7 @@ let () = let description = "Mismatch in the number of sections in the dissection" in register_error_kind `Temporary - ~id:"Dissection_number_of_sections_mismatch" + ~id:"smart_rollup_dissection_number_of_sections_mismatch" ~title:description ~description ~pp:(fun ppf (expected, given) -> @@ -185,7 +185,7 @@ let () = let description = "Invalid number of sections in the dissection" in register_error_kind `Permanent - ~id:"Dissection_invalid_number_of_sections" + ~id:"smart_rollup_dissection_invalid_number_of_sections" ~title:description ~description ~pp:(fun ppf n -> @@ -200,7 +200,7 @@ let () = let description = "Mismatch in the start hash of the dissection" in register_error_kind `Temporary - ~id:"Dissection_start_hash_mismatch" + ~id:"smart_rollup_dissection_start_hash_mismatch" ~title:description ~description ~pp:(fun ppf (given, expected) -> @@ -226,7 +226,7 @@ let () = let description = "Mismatch in the stop hash of the dissection" in register_error_kind `Temporary - ~id:"Dissection_stop_hash_mismatch" + ~id:"smart_rollup_dissection_stop_hash_mismatch" ~title:description ~description ~pp:(fun ppf h -> @@ -238,7 +238,7 @@ let () = let description = "Mismatch in the edge ticks of the dissection" in register_error_kind `Temporary - ~id:"Dissection_edge_ticks_mismatch" + ~id:"smart_rollup_dissection_edge_ticks_mismatch" ~title:description ~description ~pp: @@ -288,7 +288,7 @@ let () = let description = "Ticks should only increase in dissection" in register_error_kind `Permanent - ~id:"Dissection_ticks_not_increasing" + ~id:"smart_rollup_dissection_ticks_not_increasing" ~title:description ~description ~pp:(fun ppf () -> Format.pp_print_string ppf description) @@ -297,7 +297,7 @@ let () = (fun () -> Dissection_ticks_not_increasing) ; register_error_kind `Permanent - ~id:"Dissection_invalid_distribution" + ~id:"smart_rollup_dissection_invalid_distribution" ~title:description ~description ~pp:(fun ppf max -> @@ -312,7 +312,7 @@ let () = let description = "Cannot recover from a blocked state in a dissection" in register_error_kind `Permanent - ~id:"Dissection_invalid_successive_states_shape" + ~id:"smart_rollup_dissection_invalid_successive_states_shape" ~title:description ~description ~pp:(fun ppf () -> Format.pp_print_string ppf description) diff --git a/src/proto_alpha/lib_protocol/sc_rollup_errors.ml b/src/proto_alpha/lib_protocol/sc_rollup_errors.ml index d8579eb7296827a3c8ec1e96923747d8bf924678..32c8a8eec04548b5df76fc831f2ab673bd5fc251 100644 --- a/src/proto_alpha/lib_protocol/sc_rollup_errors.ml +++ b/src/proto_alpha/lib_protocol/sc_rollup_errors.ml @@ -103,7 +103,7 @@ type error += let () = register_error_kind `Temporary - ~id:"Sc_rollup_staker_in_game" + ~id:"smart_rollup_staker_in_game" ~title:"Staker is already playing a game" ~description:"Attempted to start a game where one staker is already busy" ~pp:(fun ppf staker -> @@ -165,7 +165,7 @@ let () = let description = "Attempt to timeout game too early" in register_error_kind `Temporary - ~id:"Sc_rollup_timeout_level_not_reached" + ~id:"smart_rollup_timeout_level_not_reached" ~title:"Attempt to timeout game too early" ~description ~pp:(fun ppf (blocks_left, staker) -> @@ -191,7 +191,7 @@ let () = in register_error_kind `Temporary - ~id:"Sc_rollup_game_already_started" + ~id:"smart_rollup_game_already_started" ~title:"Refutation game already started" ~description ~pp:(fun ppf () -> Format.fprintf ppf "%s" description) @@ -201,7 +201,7 @@ let () = let description = "Refutation game does not exist" in register_error_kind `Temporary - ~id:"Sc_rollup_no_game" + ~id:"smart_rollup_no_game" ~title:"Refutation game does not exist" ~description ~pp:(fun ppf () -> Format.fprintf ppf "%s" description) @@ -211,7 +211,7 @@ let () = let description = "Attempt to play move but not staker's turn" in register_error_kind `Temporary - ~id:"Sc_rollup_wrong_turn" + ~id:"smart_rollup_wrong_turn" ~title:"Attempt to play move but not staker's turn" ~description ~pp:(fun ppf () -> Format.fprintf ppf "%s" description) @@ -223,7 +223,7 @@ let () = in register_error_kind `Temporary - ~id:"Sc_rollup_max_number_of_messages_reached_for_commitment_period" + ~id:"smart_rollup_max_number_of_messages_reached_for_commitment_period" ~title:"Maximum number of messages reached for commitment period" ~description ~pp:(fun ppf () -> Format.fprintf ppf "%s" description) @@ -233,10 +233,10 @@ let () = Some () | _ -> None) (fun () -> Sc_rollup_max_number_of_messages_reached_for_commitment_period) ; - let description = "Tried to add zero messages to a SC rollup" in + let description = "Tried to add zero messages to a smart rollup" in register_error_kind `Permanent - ~id:"sc_rollup_errors.sc_rollup_add_zero_messages" + ~id:"smart_rollup_add_zero_messages" ~title:description ~description ~pp:(fun ppf () -> Format.fprintf ppf "%s" description) @@ -246,48 +246,52 @@ let () = let description = "Attempted to cement a disputed commitment." in register_error_kind `Temporary - ~id:"Sc_rollup_disputed" + ~id:"smart_rollup_commitment_disputed" ~title:"Commitment disputed" ~description ~pp:(fun ppf () -> Format.fprintf ppf "%s" description) Data_encoding.empty (function Sc_rollup_disputed -> Some () | _ -> None) (fun () -> Sc_rollup_disputed) ; - let description = "Attempted to use a rollup that has not been originated." in + let description = + "Attempted to use a smart rollup that has not been originated." + in register_error_kind `Temporary - ~id:"Sc_rollup_does_not_exist" - ~title:"Rollup does not exist" + ~id:"smart_rollup_does_not_exist" + ~title:"Smart rollup does not exist" ~description ~pp:(fun ppf x -> - Format.fprintf ppf "Rollup %a does not exist" Sc_rollup_repr.pp x) + Format.fprintf ppf "Smart rollup %a does not exist" Sc_rollup_repr.pp x) Data_encoding.(obj1 (req "rollup" Sc_rollup_repr.encoding)) (function Sc_rollup_does_not_exist x -> Some x | _ -> None) (fun x -> Sc_rollup_does_not_exist x) ; let description = "No conflict." in register_error_kind `Temporary - ~id:"Sc_rollup_no_conflict" + ~id:"smart_rollup_no_conflict" ~title:"No conflict" ~description ~pp:(fun ppf () -> Format.fprintf ppf "%s" description) Data_encoding.empty (function Sc_rollup_no_conflict -> Some () | _ -> None) (fun () -> Sc_rollup_no_conflict) ; - let description = "No stakers." in + let description = "No stakers for the targeted smart rollup." in register_error_kind `Temporary - ~id:"Sc_rollup_no_stakers" + ~id:"smart_rollup_no_stakers" ~title:"No stakers" ~description ~pp:(fun ppf () -> Format.fprintf ppf "%s" description) Data_encoding.empty (function Sc_rollup_no_stakers -> Some () | _ -> None) (fun () -> Sc_rollup_no_stakers) ; - let description = "Unknown staker." in + let description = + "This implicit account is not a staker of this smart rollup." + in register_error_kind `Temporary - ~id:"Sc_rollup_not_staked" + ~id:"smart_rollup_not_staked" ~title:"Unknown staker" ~description ~pp:(fun ppf () -> Format.fprintf ppf "%s" description) @@ -300,8 +304,8 @@ let () = in register_error_kind `Temporary - ~id:"Sc_rollup_not_staked_on_lcc_or_ancestor" - ~title:"Rollup not staked on LCC or its ancestor" + ~id:"smart_rollup_not_staked_on_lcc_or_ancestor" + ~title:"Smart rollup not staked on LCC or its ancestor" ~description ~pp:(fun ppf () -> Format.fprintf ppf "%s" description) Data_encoding.empty @@ -310,7 +314,7 @@ let () = let description = "Parent is not the last cemented commitment." in register_error_kind `Temporary - ~id:"Sc_rollup_parent_not_lcc" + ~id:"smart_rollup_parent_not_lcc" ~title:"Parent is not the last cemented commitment" ~description ~pp:(fun ppf () -> Format.fprintf ppf "%s" description) @@ -320,7 +324,7 @@ let () = let description = "Can not remove a staker committed on cemented." in register_error_kind `Temporary - ~id:"Sc_rollup_remove_lcc_or_ancestor" + ~id:"smart_rollup_remove_lcc_or_ancestor" ~title:"Can not remove a staker" ~description ~pp:(fun ppf () -> Format.fprintf ppf "%s" description) @@ -330,7 +334,7 @@ let () = let description = "Staker tried to double stake." in register_error_kind `Temporary - ~id:"Sc_rollup_staker_double_stake" + ~id:"smart_rollup_staker_double_stake" ~title:description ~description ~pp:(fun ppf () -> @@ -348,7 +352,7 @@ let () = in register_error_kind `Temporary - ~id:"Sc_rollup_too_far_ahead" + ~id:"smart_rollup_too_far_ahead" ~title:"Commitment too far ahead" ~description ~pp:(fun ppf () -> Format.fprintf ppf "%s" description) @@ -360,7 +364,7 @@ let () = in register_error_kind `Temporary - ~id:"Sc_rollup_commitment_too_recent" + ~id:"smart_rollup_commitment_too_recent" ~title:"Commitment too recent" ~description ~pp:(fun ppf (current_level, min_level) -> @@ -385,7 +389,7 @@ let () = let description = "Unknown commitment." in register_error_kind `Temporary - ~id:"Sc_rollup_unknown_commitment" + ~id:"smart_rollup_unknown_commitment" ~title:"Unknown commitment" ~description ~pp:(fun ppf x -> @@ -401,7 +405,7 @@ let () = let description = "Attempted to commit to a bad inbox level." in register_error_kind `Temporary - ~id:"Sc_rollup_bad_inbox_level" + ~id:"smart_rollup_bad_inbox_level" ~title:"Committing to a bad inbox level" ~description ~pp:(fun ppf () -> Format.fprintf ppf "%s" description) @@ -411,7 +415,7 @@ let () = let description = "Invalid rollup outbox message index" in register_error_kind `Temporary - ~id:"Sc_rollup_invalid_outbox_message_index" + ~id:"smart_rollup_invalid_outbox_message_index" ~title:"Invalid rollup outbox message index" ~description ~pp:(fun ppf () -> Format.fprintf ppf "%s" description) @@ -421,7 +425,7 @@ let () = let description = "Outbox level expired" in register_error_kind `Temporary - ~id:"Sc_rollup_outbox_level_expired" + ~id:"smart_rollup_outbox_level_expired" ~title:description ~description ~pp:(fun ppf () -> Format.fprintf ppf "%s" description) @@ -431,7 +435,7 @@ let () = let description = "Outbox message already applied" in register_error_kind `Temporary - ~id:"Sc_rollup_outbox_message_already_applied" + ~id:"smart_rollup_outbox_message_already_applied" ~title:description ~description ~pp:(fun ppf () -> Format.fprintf ppf "%s" description) @@ -440,17 +444,16 @@ let () = (fun () -> Sc_rollup_outbox_message_already_applied) ; register_error_kind `Temporary - ~id:"Sc_rollup_staker_funds_too_low" + ~id:"smart_rollup_staker_funds_too_low" ~title:"Staker does not have enough funds to make a deposit" ~description: - "Staker doesn't have enough funds to make a smart contract rollup \ - deposit." + "Staker doesn't have enough funds to make a smart rollup deposit." ~pp:(fun ppf (staker, sc_rollup, staker_balance, min_expected_balance) -> Format.fprintf ppf "Staker (%a) doesn't have enough funds to make the deposit for smart \ - contract rollup (%a). Staker's balance is %a while a balance of at \ - least %a is required." + rollup (%a). Staker's balance is %a while a balance of at least %a is \ + required." Signature.Public_key_hash.pp staker Sc_rollup_repr.pp @@ -462,7 +465,7 @@ let () = Data_encoding.( obj4 (req "staker" Signature.Public_key_hash.encoding) - (req "sc_rollup" Sc_rollup_repr.encoding) + (req "smart_rollup" Sc_rollup_repr.encoding) (req "staker_balance" Tez_repr.encoding) (req "min_expected_balance" Tez_repr.encoding)) (function @@ -476,7 +479,7 @@ let () = let description = "Could not serialize commitment." in register_error_kind `Temporary - ~id:"Sc_rollup_bad_commitment_serialization" + ~id:"smart_rollup_bad_commitment_serialization" ~title:"Could not serialize commitment." ~description:"Unable to hash the commitment serialization." ~pp:(fun ppf () -> Format.fprintf ppf "%s" description) @@ -488,7 +491,7 @@ let () = in register_error_kind `Temporary - ~id:"Sc_rollup_commitment_from_future" + ~id:"smart_rollup_commitment_from_future" ~title:"Commitment from future" ~description ~pp:(fun ppf (current_level, inbox_level) -> @@ -513,7 +516,7 @@ let () = let description = "Commitment is past the curfew for this level." in register_error_kind `Permanent - ~id:"Sc_rollup_commitment_past_curfew" + ~id:"smart_rollup_commitment_past_curfew" ~title:"Commitment past curfew." ~description: "A commitment exists for this inbox level for longer than the curfew \ @@ -522,10 +525,10 @@ let () = Data_encoding.empty (function Sc_rollup_commitment_past_curfew -> Some () | _ -> None) (fun () -> Sc_rollup_commitment_past_curfew) ; - let description = "Error while generating rollup address" in + let description = "Error while generating a smart rollup address" in register_error_kind `Permanent - ~id:"rollup.error_smart_contract_rollup_address_generation" + ~id:"smart_rollup_address_generation" ~title:description ~pp:(fun ppf () -> Format.fprintf ppf "%s" description) ~description @@ -535,7 +538,7 @@ let () = let description = "Tried to publish a 0 tick commitment" in register_error_kind `Permanent - ~id:"Sc_rollup_zero_tick_commitment" + ~id:"smart_rollup_zero_tick_commitment" ~title:description ~pp:(fun ppf () -> Format.fprintf ppf "%s" description) ~description @@ -545,7 +548,7 @@ let () = let description = "Maximal number of parallel games reached" in register_error_kind `Temporary - ~id:"Sc_rollup_maximal_number_of_parallel_games_reached" + ~id:"smart_rollup_maximal_number_of_parallel_games_reached" ~title:description ~pp:(fun ppf staker -> Format.fprintf @@ -562,7 +565,7 @@ let () = let description = "Conflicting commitments do not have a common ancestor" in register_error_kind `Permanent - ~id:"Sc_rollup_not_valid_commitments_conflict" + ~id:"smart_rollup_not_valid_commitments_conflict" ~title:description ~pp:(fun ppf (c1, s1, c2, s2) -> Format.fprintf @@ -594,7 +597,7 @@ let () = let description = "Given commitment is not staked by given staker" in register_error_kind `Permanent - ~id:"Sc_rollup_wrong_staker_for_conflict_commitment" + ~id:"smart_rollup_wrong_staker_for_conflict_commitment" ~title:description ~pp:(fun ppf (staker, commitment) -> Format.fprintf @@ -618,7 +621,7 @@ let () = let description = "Given commitment cannot be cemented" in register_error_kind `Permanent - ~id:"Sc_rollup_invalid_commitment_to_cement" + ~id:"smart_rollup_invalid_commitment_to_cement" ~title:description ~pp:(fun ppf (valid_candidate, invalid_candidate) -> Format.fprintf @@ -648,7 +651,7 @@ let () = let description = "Published commitment is too old" in register_error_kind `Permanent - ~id:"Sc_rollup_commitment_too_old" + ~id:"smart_rollup_commitment_too_old" ~title:description ~pp:(fun ppf (last_cemented_inbox_level, commitment_inbox_level) -> Format.fprintf diff --git a/src/proto_alpha/lib_protocol/sc_rollup_inbox_merkelized_payload_hashes_repr.ml b/src/proto_alpha/lib_protocol/sc_rollup_inbox_merkelized_payload_hashes_repr.ml index ab8dd22dda01060a693a5f700994a12f6a960d61..eb928f77322d842724ea1e76ba71cac0b156532e 100644 --- a/src/proto_alpha/lib_protocol/sc_rollup_inbox_merkelized_payload_hashes_repr.ml +++ b/src/proto_alpha/lib_protocol/sc_rollup_inbox_merkelized_payload_hashes_repr.ml @@ -28,7 +28,7 @@ let () = let open Data_encoding in register_error_kind `Permanent - ~id:"sc_rollup_inbox_message_repr.merkelized_payload_hashes_proof_error" + ~id:"internal.smart_rollup_merklized_payload_hashes_proof" ~title: "Internal error: error occurred during proof production or validation" ~description:"A merkelized payload hashes proof error." diff --git a/src/proto_alpha/lib_protocol/sc_rollup_inbox_message_repr.ml b/src/proto_alpha/lib_protocol/sc_rollup_inbox_message_repr.ml index b44d6a9a441d0c03117789f9ef67c92bc0799db9..42bb43c6ef24ff8e20165735e15bc23e94c1e141 100644 --- a/src/proto_alpha/lib_protocol/sc_rollup_inbox_message_repr.ml +++ b/src/proto_alpha/lib_protocol/sc_rollup_inbox_message_repr.ml @@ -34,7 +34,7 @@ let () = in register_error_kind `Permanent - ~id:"sc_rollup_inbox_message_repr.error_encoding_inbox_message" + ~id:"smart_rollup_inbox_message_encoding" ~title:msg ~pp:(fun fmt () -> Format.fprintf fmt "%s" msg) ~description:msg @@ -42,11 +42,11 @@ let () = (function Error_encode_inbox_message -> Some () | _ -> None) (fun () -> Error_encode_inbox_message) ; let msg = - "Failed to decode a rollup management protocol inbox message value" + "Failed to decode a smart rollup management protocol inbox message value" in register_error_kind `Permanent - ~id:"sc_rollup_inbox_message_repr.error_decoding_inbox_message" + ~id:"smart_rollup_inbox_message_decoding" ~title:msg ~pp:(fun fmt () -> Format.fprintf fmt "%s" msg) ~description:msg diff --git a/src/proto_alpha/lib_protocol/sc_rollup_inbox_repr.ml b/src/proto_alpha/lib_protocol/sc_rollup_inbox_repr.ml index ec7378f72df512d5f43aaf0b089ef467766807be..7b754276bca5442c4665fc72b497103ba8838544 100644 --- a/src/proto_alpha/lib_protocol/sc_rollup_inbox_repr.ml +++ b/src/proto_alpha/lib_protocol/sc_rollup_inbox_repr.ml @@ -61,7 +61,7 @@ let () = let open Data_encoding in register_error_kind `Permanent - ~id:"sc_rollup_inbox.inbox_proof_error" + ~id:"internal.smart_rollup_inbox_proof_error" ~title: "Internal error: error occurred during proof production or validation" ~description:"An inbox proof error." @@ -72,7 +72,7 @@ let () = register_error_kind `Permanent - ~id:"sc_rollup_inbox.add_zero_messages" + ~id:"internal.smart_rollup_add_zero_messages" ~title:"Internal error: trying to add zero messages" ~description: "Message adding functions must be called with a positive number of \ @@ -90,7 +90,7 @@ let () = in register_error_kind `Permanent - ~id:"sc_rollup_inbox.inbox_level_reached_message_limit" + ~id:"smart_rollup_inbox_level_reached_message_limit" ~title:"Inbox level reached messages limit" ~description ~pp:(fun ppf _ -> Format.pp_print_string ppf description) diff --git a/src/proto_alpha/lib_protocol/sc_rollup_management_protocol.ml b/src/proto_alpha/lib_protocol/sc_rollup_management_protocol.ml index 3ab96e8ee9c5b88940be8a55d013d9335b29f9b4..5747065d8bc553e25fc1597c850178b6f65af7ae 100644 --- a/src/proto_alpha/lib_protocol/sc_rollup_management_protocol.ml +++ b/src/proto_alpha/lib_protocol/sc_rollup_management_protocol.ml @@ -32,7 +32,7 @@ let () = let msg = "Invalid destination" in register_error_kind `Permanent - ~id:"sc_rollup_management_protocol.sc_rollup_invalid_destination" + ~id:"smart_rollup_management_protocol_invalid_destination" ~title:msg ~pp:(fun fmt () -> Format.fprintf fmt "%s" msg) ~description:msg diff --git a/src/proto_alpha/lib_protocol/sc_rollup_operations.ml b/src/proto_alpha/lib_protocol/sc_rollup_operations.ml index 0e9433667e2f6b06ff6cf9fa8fa2341486d281da..98d618f0b66cf8b64202e23a645eaa33dfc1d346 100644 --- a/src/proto_alpha/lib_protocol/sc_rollup_operations.ml +++ b/src/proto_alpha/lib_protocol/sc_rollup_operations.ml @@ -39,10 +39,10 @@ type execute_outbox_message_result = { } let () = - let description = "Invalid parameters type for rollup" in + let description = "Invalid parameters type for smart rollup" in register_error_kind `Permanent - ~id:"Sc_rollup_invalid_parameters_type" + ~id:"smart_rollup_invalid_parameters_type" ~title:"Invalid parameters type" ~description ~pp:(fun fmt () -> Format.fprintf fmt "%s" description) @@ -52,7 +52,7 @@ let () = let description = "Invalid last-cemented-commitment" in register_error_kind `Permanent - ~id:"Sc_rollup_invalid_last_cemented_commitment" + ~id:"smart_rollup_invalid_last_cemented_commitment" ~title:description ~description ~pp:(fun ppf () -> Format.fprintf ppf "%s" description) @@ -63,7 +63,7 @@ let () = let description = "Invalid output proof" in register_error_kind `Permanent - ~id:"Sc_rollup_invalid_output_proof" + ~id:"smart_rollup_invalid_output_proof" ~title:description ~description ~pp:(fun ppf () -> Format.fprintf ppf "%s" description) @@ -73,7 +73,7 @@ let () = let description = "Invalid outbox level" in register_error_kind `Permanent - ~id:"Sc_rollup_invalid_outbox_level" + ~id:"smart_rollup_invalid_outbox_level" ~title:description ~description ~pp:(fun ppf () -> Format.fprintf ppf "%s" description) diff --git a/src/proto_alpha/lib_protocol/sc_rollup_outbox_message_repr.ml b/src/proto_alpha/lib_protocol/sc_rollup_outbox_message_repr.ml index 33292d5f51aa52f783e631a3c51e246e4ea0c386..3fea0d8925cf0884737c3d10ff8233529d0f10ab 100644 --- a/src/proto_alpha/lib_protocol/sc_rollup_outbox_message_repr.ml +++ b/src/proto_alpha/lib_protocol/sc_rollup_outbox_message_repr.ml @@ -34,7 +34,7 @@ let () = in register_error_kind `Permanent - ~id:"sc_rollup_outbox_message_repr.error_encoding_outbox_message" + ~id:"smart_rollup_outbox_message_repr.error_encoding_outbox_message" ~title:msg ~pp:(fun fmt () -> Format.fprintf fmt "%s" msg) ~description:msg @@ -46,7 +46,7 @@ let () = in register_error_kind `Permanent - ~id:"sc_rollup_outbox_message_repr.error_decoding_outbox_message" + ~id:"smart_rollup_outbox_message_repr.error_decoding_outbox_message" ~title:msg ~pp:(fun fmt () -> Format.fprintf fmt "%s" msg) ~description:msg diff --git a/src/proto_alpha/lib_protocol/sc_rollup_proof_repr.ml b/src/proto_alpha/lib_protocol/sc_rollup_proof_repr.ml index bc74d5aa87e6df09193b69d95d837d75b73f820f..b12d17bfe8c2f9611c5c5aeed6d93ef16150e118 100644 --- a/src/proto_alpha/lib_protocol/sc_rollup_proof_repr.ml +++ b/src/proto_alpha/lib_protocol/sc_rollup_proof_repr.ml @@ -31,7 +31,7 @@ type error += Sc_rollup_invalid_serialized_inbox_proof let () = register_error_kind `Permanent - ~id:"Sc_rollup_proof_check" + ~id:"smart_rollup_proof_check" ~title:"Invalid proof" ~description:"An invalid proof has been submitted" ~pp:(fun fmt msg -> Format.fprintf fmt "Invalid proof: %s" msg) @@ -41,7 +41,7 @@ let () = register_error_kind `Permanent - ~id:"Sc_rollup_invalid_serialized_inbox_proof" + ~id:"smart_rollup_invalid_serialized_inbox_proof" ~title:"Invalid serialized inbox proof" ~description:"The serialized inbox proof can not be de-serialized" ~pp:(fun fmt () -> Format.fprintf fmt "Invalid serialized inbox proof") diff --git a/src/proto_alpha/lib_protocol/sc_rollup_wasm.ml b/src/proto_alpha/lib_protocol/sc_rollup_wasm.ml index 30df0dfbe716378b82186431895161457bd67150..677903b3fc8bda4c0ccc001c472864fe69fbcaf9 100644 --- a/src/proto_alpha/lib_protocol/sc_rollup_wasm.ml +++ b/src/proto_alpha/lib_protocol/sc_rollup_wasm.ml @@ -39,7 +39,7 @@ let () = let msg = "Invalid claim about outbox" in register_error_kind `Permanent - ~id:"sc_rollup_wasm_invalid_claim_about_outbox" + ~id:"smart_rollup_wasm_invalid_claim_about_outbox" ~title:msg ~pp:(fun fmt () -> Format.pp_print_string fmt msg) ~description:msg @@ -49,7 +49,7 @@ let () = let msg = "Output proof production failed" in register_error_kind `Permanent - ~id:"sc_rollup_wasm_output_proof_production_failed" + ~id:"smart_rollup_wasm_output_proof_production_failed" ~title:msg ~pp:(fun fmt () -> Format.fprintf fmt "%s" msg) ~description:msg @@ -59,7 +59,7 @@ let () = let msg = "Proof production failed" in register_error_kind `Permanent - ~id:"sc_rollup_wasm_proof_production_failed" + ~id:"smart_rollup_wasm_proof_production_failed" ~title:msg ~pp:(fun fmt () -> Format.fprintf fmt "%s" msg) ~description:msg @@ -72,7 +72,7 @@ let () = in register_error_kind `Permanent - ~id:"sc_rollup_wasm_invalid_dissection_distribution" + ~id:"smart_rollup_wasm_invalid_dissection_distribution" ~title:msg ~pp:(fun fmt () -> Format.fprintf fmt "%s" msg) ~description:msg 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 1aa670624d130947393c91d42150501b89c98185..2f52f374f2f511a3578f2c6b5c3ab56af690a28d 100644 --- a/src/proto_alpha/lib_protocol/script_tc_errors_registration.ml +++ b/src/proto_alpha/lib_protocol/script_tc_errors_registration.ml @@ -277,8 +277,7 @@ let () = `Permanent ~id:"michelson_v1.sc_rollup_disabled" ~title:"Sc rollup are disabled" - ~description: - "Cannot use smart-contract rollup features as they are disabled." + ~description:"Cannot use smart rollup features as they are disabled." (obj1 (req "location" Script.location_encoding)) (function Sc_rollup_disabled loc -> Some loc | _ -> None) (fun loc -> Sc_rollup_disabled loc) ; diff --git a/src/proto_alpha/lib_protocol/validate_errors.ml b/src/proto_alpha/lib_protocol/validate_errors.ml index ed446b6910e00eff82ad500e9caa909a2e4d486b..53dfc99e17c4aa0d2ea77165d537ae5d9a3be172 100644 --- a/src/proto_alpha/lib_protocol/validate_errors.ml +++ b/src/proto_alpha/lib_protocol/validate_errors.ml @@ -1259,13 +1259,11 @@ module Manager = struct Data_encoding.unit (function Tx_rollup_feature_disabled -> Some () | _ -> None) (fun () -> Tx_rollup_feature_disabled) ; - let scoru_disabled_description = - "Smart contract rollups will be enabled in a future proposal." - in + let scoru_disabled_description = "Smart rollups are disabled." in register_error_kind `Permanent - ~id:"validate.operation.sc_rollup_disabled" - ~title:"Smart contract rollups are disabled" + ~id:"validate.operation.smart_rollup_disabled" + ~title:"Smart rollups are disabled" ~description:scoru_disabled_description ~pp:(fun ppf () -> Format.fprintf ppf "%s" scoru_disabled_description) Data_encoding.unit diff --git a/tezt/tests/sc_rollup.ml b/tezt/tests/sc_rollup.ml index 799c8975345ee0f1c1f306b1e2276fc1e913f8b8..6ca533124539b56568d96438ffd6cd22c5b24907 100644 --- a/tezt/tests/sc_rollup.ml +++ b/tezt/tests/sc_rollup.ml @@ -2612,7 +2612,11 @@ let test_consecutive_commitments _protocol _rollup_node _rollup_client sc_rollup ~sc_rollup operator in - let* () = Process.check_error ~msg:(rex "Unknown staker") process in + let* () = + Process.check_error + ~msg:(rex "This implicit account is not a staker of this smart rollup") + process + in let* predecessor, _ = last_cemented_commitment_hash_with_level ~sc_rollup tezos_client in