diff --git a/docs/protocols/alpha.rst b/docs/protocols/alpha.rst index 1ca7866abd68facdf966676e734a259737cc68a2..c74a4e44e77aba0b1218bfeac8422057ad532330 100644 --- a/docs/protocols/alpha.rst +++ b/docs/protocols/alpha.rst @@ -72,6 +72,8 @@ Gas improvements Breaking Changes ---------------- +- Operation ``Set_deposits_limit`` removed. (MR :gl:`!8831`) + - Protocol parameter ``ratio_of_frozen_deposits_slashed_per_double_endorsement`` is converted from the ratio ``1/5`` into the percentage ``50%`` and renamed to ``percentage_of_frozen_deposits_slashed_per_double_endorsement``. (MR :gl:`!8753`) diff --git a/src/proto_alpha/lib_client/client_proto_context.ml b/src/proto_alpha/lib_client/client_proto_context.ml index e3f2d221998140ecede362b629b6bb89a4e5c858..5e65df7c3ce4ac5aa4094fc341b46beffa3c9ee4 100644 --- a/src/proto_alpha/lib_client/client_proto_context.ml +++ b/src/proto_alpha/lib_client/client_proto_context.ml @@ -95,9 +95,6 @@ let get_contract_all_ticket_balances (rpc : #rpc_context) ~chain ~block contract let ticket_balances_encoding = Plugin.RPC.Contract.ticket_balances_encoding -let get_frozen_deposits_limit (rpc : #rpc_context) ~chain ~block delegate = - Alpha_services.Delegate.frozen_deposits_limit rpc (chain, block) delegate - let parse_expression arg = Lwt.return (Micheline_parser.no_parsing_error @@ -432,39 +429,6 @@ let drain_delegate cctxt ~chain ~block ?confirmations ?dry_run ?verbose_signing | Apply_results.Single_and_result ((Drain_delegate _ as op), result) -> return (oph, op, result) -let set_deposits_limit cctxt ~chain ~block ?confirmations ?dry_run - ?verbose_signing ?simulation ?fee contract ~src_pk ~manager_sk - ~fee_parameter limit_opt = - let operation = Set_deposits_limit limit_opt in - let operation = - Injection.prepare_manager_operation - ~fee:(Limit.of_option fee) - ~gas_limit:Limit.unknown - ~storage_limit:Limit.unknown - operation - in - let operation = Annotated_manager_operation.Single_manager operation in - Injection.inject_manager_operation - cctxt - ~chain - ~block - ?confirmations - ?dry_run - ?verbose_signing - ?simulation - ~source:contract - ~fee:(Limit.of_option fee) - ~gas_limit:Limit.unknown - ~storage_limit:Limit.unknown - ~src_pk - ~src_sk:manager_sk - ~fee_parameter - operation - >>=? fun (oph, _, op, result) -> - match Apply_results.pack_contents_list op result with - | Apply_results.Single_and_result ((Manager_operation _ as op), result) -> - return (oph, op, result) - let increase_paid_storage cctxt ~chain ~block ?force ?dry_run ?verbose_signing ?fee ?confirmations ?simulation ~source ~destination ~src_pk ~manager_sk ~fee_parameter ~amount_in_bytes () = diff --git a/src/proto_alpha/lib_client/client_proto_context.mli b/src/proto_alpha/lib_client/client_proto_context.mli index cccb551659a35c9bbea7178fddb96e0e7cc11682..08bfeefd7f7b73ecea3352b2a61b51f802260532 100644 --- a/src/proto_alpha/lib_client/client_proto_context.mli +++ b/src/proto_alpha/lib_client/client_proto_context.mli @@ -146,14 +146,6 @@ val get_contract_all_ticket_balances : val ticket_balances_encoding : (Ticket_token.unparsed_token * Z.t) list Data_encoding.t -(** Calls {!Tezos_protocol_alpha.Protocol.Delegate_services.val-frozen_deposits_limit}. *) -val get_frozen_deposits_limit : - #Protocol_client_context.rpc_context -> - chain:Shell_services.chain -> - block:Shell_services.block -> - Signature.Public_key_hash.t -> - Tez.t option tzresult Lwt.t - (** Calls {!Injection.prepare_manager_operation} with {!Alpha_context.Delegation} [delegate_opt] as operation. *) val build_delegate_operation : @@ -212,25 +204,6 @@ val drain_delegate : unit -> Kind.drain_delegate Injection.result tzresult Lwt.t -(** Calls {!Injection.inject_manager_operation} - with {!Annotated_manager_operation.Single_manager} {!Alpha_context.Set_deposits_limit} [limit_opt] - as operation. *) -val set_deposits_limit : - #Protocol_client_context.full -> - chain:Shell_services.chain -> - block:Shell_services.block -> - ?confirmations:int -> - ?dry_run:bool -> - ?verbose_signing:bool -> - ?simulation:bool -> - ?fee:Tez.tez -> - public_key_hash -> - src_pk:public_key -> - manager_sk:Client_keys.sk_uri -> - fee_parameter:Injection.fee_parameter -> - Tez.t option -> - Kind.set_deposits_limit Kind.manager Injection.result tzresult Lwt.t - (** Calls {!Injection.inject_manager_operation} with {!Annotated_manager_operation.Single_manager} {!Alpha_context.Increase_paid_storage} [{amount_in_bytes; destination}] as operation. *) diff --git a/src/proto_alpha/lib_client/injection.ml b/src/proto_alpha/lib_client/injection.ml index 74df530ace43da60e554bc1caf3ddd882f797724..bb125faf698e2d06d88b15e97950fbb460d073ed 100644 --- a/src/proto_alpha/lib_client/injection.ml +++ b/src/proto_alpha/lib_client/injection.ml @@ -326,7 +326,6 @@ let estimated_gas_single (type kind) | Reveal_result {consumed_gas} | Delegation_result {consumed_gas} | Register_global_constant_result {consumed_gas; _} - | Set_deposits_limit_result {consumed_gas} | Update_consensus_key_result {consumed_gas; _} | Increase_paid_storage_result {consumed_gas; _} | Transfer_ticket_result {consumed_gas; _} @@ -401,9 +400,8 @@ let estimated_storage_single (type kind) ~origination_size | Sc_rollup_originate_result {size; _} -> Ok size | Zk_rollup_origination_result {storage_size; _} -> Ok storage_size | Transaction_result (Transaction_to_sc_rollup_result _) - | Reveal_result _ | Delegation_result _ | Set_deposits_limit_result _ - | Increase_paid_storage_result _ | Dal_publish_slot_header_result _ - | Sc_rollup_add_messages_result _ + | Reveal_result _ | Delegation_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. @@ -478,13 +476,12 @@ let originated_contracts_single (type kind) ( Transaction_to_sc_rollup_result _ | Transaction_to_zk_rollup_result _ ) | Register_global_constant_result _ | Reveal_result _ - | Delegation_result _ | Set_deposits_limit_result _ - | Update_consensus_key_result _ | Increase_paid_storage_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 _ + | Delegation_result _ | Update_consensus_key_result _ + | Increase_paid_storage_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 []) @@ -831,8 +828,7 @@ let may_patch_limits (type kind) (cctxt : #Protocol_client_context.full) let safety_guard = match c.operation with | Transaction {destination = Implicit _; _} - | Reveal _ | Delegation _ | Set_deposits_limit _ - | Increase_paid_storage _ -> + | Reveal _ | Delegation _ | Increase_paid_storage _ -> Gas.Arith.zero | _ -> safety_guard in diff --git a/src/proto_alpha/lib_client/operation_result.ml b/src/proto_alpha/lib_client/operation_result.ml index cde98e3071061bf9bc57f8ccf4d8d800707110d5..00e266a74e2a6e98b0801912ed280e8e41c4f7f9 100644 --- a/src/proto_alpha/lib_client/operation_result.ml +++ b/src/proto_alpha/lib_client/operation_result.ml @@ -190,15 +190,6 @@ let pp_manager_operation_content (type kind) source ppf "Register Global:@,Value: %a" pp_micheline_from_lazy_expr value - | Set_deposits_limit limit_opt -> ( - Format.fprintf - ppf - "Set deposits limit:@,Delegate: %a@," - Contract.pp - source ; - match limit_opt with - | None -> Format.pp_print_string ppf "Unlimited deposits" - | Some limit -> Format.fprintf ppf "Limit: %a" Tez.pp limit) | Increase_paid_storage {amount_in_bytes; destination} -> Format.fprintf ppf @@ -724,7 +715,6 @@ let pp_manager_operation_contents_result ppf op_result = | Origination_result _ -> "origination" | Delegation_result _ -> "delegation" | Register_global_constant_result _ -> "global constant registration" - | Set_deposits_limit_result _ -> "deposits limit modification" | Update_consensus_key_result _ -> "consensus key update" | Increase_paid_storage_result _ -> "paid storage increase" | Transfer_ticket_result _ -> "tickets transfer" @@ -748,8 +738,6 @@ let pp_manager_operation_contents_result ppf op_result = match result with | Reveal_result {consumed_gas} -> pp_consumed_gas ppf consumed_gas | Delegation_result {consumed_gas} -> pp_consumed_gas ppf consumed_gas - | Set_deposits_limit_result {consumed_gas} -> - pp_consumed_gas ppf consumed_gas | Update_consensus_key_result {consumed_gas} -> pp_consumed_gas ppf consumed_gas | Transaction_result tx -> pp_transaction_result ppf tx diff --git a/src/proto_alpha/lib_client_commands/client_proto_context_commands.ml b/src/proto_alpha/lib_client_commands/client_proto_context_commands.ml index 51021555228021d6830c4e0f1126023d85d32338..90f6f6ece8fde276a8b01e586032b74a67c1349d 100644 --- a/src/proto_alpha/lib_client_commands/client_proto_context_commands.ml +++ b/src/proto_alpha/lib_client_commands/client_proto_context_commands.ml @@ -784,31 +784,6 @@ let commands_ro () = .unsigned_encoding_with_legacy_attestation_name) in return_unit); - command - ~group - ~desc:"Get the frozen deposits limit of a delegate." - no_options - (prefixes ["get"; "deposits"; "limit"; "for"] - @@ Client_keys.Public_key_hash.source_param - ~name:"src" - ~desc:"source delegate" - @@ stop) - (fun () delegate (cctxt : Protocol_client_context.full) -> - let open Lwt_result_syntax in - let* deposit = - get_frozen_deposits_limit - cctxt - ~chain:cctxt#chain - ~block:cctxt#block - delegate - in - let*! () = - match deposit with - | None -> cctxt#answer "unlimited" - | Some limit -> - cctxt#answer "%a %s" Tez.pp limit Operation_result.tez_sym - in - return_unit); ] (* ----------------------------------------------------------------------------*) @@ -2422,83 +2397,6 @@ let commands_rw () = ballot in return_unit); - command - ~group - ~desc:"Set the deposits limit of a registered delegate." - (args5 - fee_arg - dry_run_switch - verbose_signing_switch - simulate_switch - fee_parameter_args) - (prefixes ["set"; "deposits"; "limit"; "for"] - @@ Client_keys.Public_key_hash.source_param - ~name:"src" - ~desc:"source contract" - @@ prefix "to" - @@ tez_param - ~name:"deposits limit" - ~desc:"the maximum amount of frozen deposits" - @@ stop) - (fun (fee, dry_run, verbose_signing, simulation, fee_parameter) - mgr - limit - (cctxt : Protocol_client_context.full) -> - let open Lwt_result_syntax in - let* _, src_pk, manager_sk = Client_keys.get_key cctxt mgr in - let* (_ : _ Injection.result) = - set_deposits_limit - cctxt - ~chain:cctxt#chain - ~block:cctxt#block - ?confirmations:cctxt#confirmations - ~dry_run - ~verbose_signing - ~simulation - ~fee_parameter - ?fee - mgr - ~src_pk - ~manager_sk - (Some limit) - in - return_unit); - command - ~group - ~desc:"Remove the deposits limit of a registered delegate." - (args5 - fee_arg - dry_run_switch - verbose_signing_switch - simulate_switch - fee_parameter_args) - (prefixes ["unset"; "deposits"; "limit"; "for"] - @@ Client_keys.Public_key_hash.source_param - ~name:"src" - ~desc:"source contract" - @@ stop) - (fun (fee, dry_run, verbose_signing, simulation, fee_parameter) - mgr - (cctxt : Protocol_client_context.full) -> - let open Lwt_result_syntax in - let* _, src_pk, manager_sk = Client_keys.get_key cctxt mgr in - let* (_ : _ Injection.result) = - set_deposits_limit - cctxt - ~chain:cctxt#chain - ~block:cctxt#block - ?confirmations:cctxt#confirmations - ~dry_run - ~verbose_signing - ~simulation - ~fee_parameter - ?fee - mgr - ~src_pk - ~manager_sk - None - in - return_unit); command ~group ~desc:"Increase the paid storage of a smart contract." diff --git a/src/proto_alpha/lib_protocol/alpha_context.mli b/src/proto_alpha/lib_protocol/alpha_context.mli index e6034415b832a8747e2baaa3dd9d7ce2f2545590..522186053bb077d4779d8a07c68903348175ac51 100644 --- a/src/proto_alpha/lib_protocol/alpha_context.mli +++ b/src/proto_alpha/lib_protocol/alpha_context.mli @@ -2096,12 +2096,6 @@ end module Delegate : sig val check_not_tz4 : Signature.public_key_hash -> unit tzresult - val frozen_deposits_limit : - context -> public_key_hash -> Tez.t option tzresult Lwt.t - - val set_frozen_deposits_limit : - context -> public_key_hash -> Tez.t option -> context Lwt.t - val fold : context -> order:[`Sorted | `Undefined] -> @@ -4039,8 +4033,6 @@ module Kind : sig type event = Event_kind - type set_deposits_limit = Set_deposits_limit_kind - type increase_paid_storage = Increase_paid_storage_kind type update_consensus_key = Update_consensus_key_kind @@ -4085,7 +4077,6 @@ module Kind : sig | Delegation_manager_kind : delegation manager | Event_manager_kind : event manager | Register_global_constant_manager_kind : register_global_constant manager - | 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 | Transfer_ticket_manager_kind : transfer_ticket manager @@ -4226,9 +4217,6 @@ and _ manager_operation = value : Script.lazy_expr; } -> Kind.register_global_constant manager_operation - | Set_deposits_limit : - Tez.t option - -> Kind.set_deposits_limit manager_operation | Increase_paid_storage : { amount_in_bytes : Z.t; destination : Contract_hash.t; @@ -4478,8 +4466,6 @@ module Operation : sig val register_global_constant_case : Kind.register_global_constant Kind.manager case - val set_deposits_limit_case : Kind.set_deposits_limit Kind.manager case - val increase_paid_storage_case : Kind.increase_paid_storage Kind.manager case @@ -4535,8 +4521,6 @@ module Operation : sig val register_global_constant_case : Kind.register_global_constant case - val set_deposits_limit_case : Kind.set_deposits_limit case - val increase_paid_storage_case : Kind.increase_paid_storage case val transfer_ticket_case : Kind.transfer_ticket case diff --git a/src/proto_alpha/lib_protocol/apply.ml b/src/proto_alpha/lib_protocol/apply.ml index 4d2775b0b379bcf197980fca9ad9a7c109294eba..b94378349bddecf722905be46b433c742967552b 100644 --- a/src/proto_alpha/lib_protocol/apply.ml +++ b/src/proto_alpha/lib_protocol/apply.ml @@ -32,7 +32,6 @@ open Alpha_context type error += | Not_enough_endorsements of {required : int; provided : int} | Faulty_validation_wrong_slot - | Set_deposits_limit_on_unregistered_delegate of Signature.Public_key_hash.t | Error_while_taking_fees | Update_consensus_key_on_unregistered_delegate of Signature.Public_key_hash.t | Empty_transaction of Contract.t @@ -81,21 +80,6 @@ let () = Data_encoding.empty (function Faulty_validation_wrong_slot -> Some () | _ -> None) (fun () -> Faulty_validation_wrong_slot) ; - register_error_kind - `Temporary - ~id:"operation.set_deposits_limit_on_unregistered_delegate" - ~title:"Set deposits limit on an unregistered delegate" - ~description:"Cannot set deposits limit on an unregistered delegate." - ~pp:(fun ppf c -> - Format.fprintf - ppf - "Cannot set a deposits limit on the unregistered delegate %a." - Signature.Public_key_hash.pp - c) - Data_encoding.(obj1 (req "delegate" Signature.Public_key_hash.encoding)) - (function - | Set_deposits_limit_on_unregistered_delegate c -> Some c | _ -> None) - (fun c -> Set_deposits_limit_on_unregistered_delegate c) ; let error_while_taking_fees_description = "There was an error while taking the fees, which should not happen and \ @@ -1223,18 +1207,6 @@ let apply_manager_operation : } in return (ctxt, result, []) - | Set_deposits_limit limit -> - Delegate.registered ctxt source >>= fun is_registered -> - error_unless - is_registered - (Set_deposits_limit_on_unregistered_delegate source) - >>?= fun () -> - Delegate.set_frozen_deposits_limit ctxt source limit >>= fun ctxt -> - return - ( ctxt, - Set_deposits_limit_result - {consumed_gas = Gas.consumed ~since:ctxt_before_op ~until:ctxt}, - [] ) | Increase_paid_storage {amount_in_bytes; destination} -> Contract.increase_paid_storage ctxt destination ~amount_in_bytes >>=? fun ctxt -> @@ -1553,8 +1525,7 @@ let burn_manager_storage_fees : size_of_constant = payload.size_of_constant; global_address = payload.global_address; } ) - | Set_deposits_limit_result _ | Update_consensus_key_result _ -> - return (ctxt, storage_limit, smopr) + | Update_consensus_key_result _ -> return (ctxt, storage_limit, smopr) | Increase_paid_storage_result _ -> return (ctxt, storage_limit, smopr) | Transfer_ticket_result payload -> let consumed = payload.paid_storage_size_diff in diff --git a/src/proto_alpha/lib_protocol/apply_results.ml b/src/proto_alpha/lib_protocol/apply_results.ml index 83f991b2144055f261b2ce9b48689f5555175c7a..a458578dbcc2c8fb2d0e7ee83af441ca636e546e 100644 --- a/src/proto_alpha/lib_protocol/apply_results.ml +++ b/src/proto_alpha/lib_protocol/apply_results.ml @@ -57,10 +57,6 @@ type _ successful_manager_operation_result = global_address : Script_expr_hash.t; } -> Kind.register_global_constant successful_manager_operation_result - | Set_deposits_limit_result : { - consumed_gas : Gas.Arith.fp; - } - -> Kind.set_deposits_limit successful_manager_operation_result | Increase_paid_storage_result : { balance_updates : Receipt.balance_updates; consumed_gas : Gas.Arith.fp; @@ -470,21 +466,6 @@ module Manager_result = struct | Update_consensus_key_result {consumed_gas} -> consumed_gas) ~inj:(fun consumed_gas -> Update_consensus_key_result {consumed_gas}) - let set_deposits_limit_case = - make - ~op_case:Operation.Encoding.Manager_operations.set_deposits_limit_case - ~encoding: - Data_encoding.( - obj1 (dft "consumed_milligas" Gas.Arith.n_fp_encoding Gas.Arith.zero)) - ~select:(function - | Successful_manager_result (Set_deposits_limit_result _ as op) -> - Some op - | _ -> None) - ~kind:Kind.Set_deposits_limit_manager_kind - ~proj:(function - | Set_deposits_limit_result {consumed_gas} -> consumed_gas) - ~inj:(fun consumed_gas -> Set_deposits_limit_result {consumed_gas}) - let increase_paid_storage_case = make ~op_case:Operation.Encoding.Manager_operations.increase_paid_storage_case @@ -858,7 +839,6 @@ let successful_manager_operation_result_encoding : make Manager_result.origination_case; make Manager_result.delegation_case; make Manager_result.update_consensus_key_case; - make Manager_result.set_deposits_limit_case; make Manager_result.increase_paid_storage_case; make Manager_result.sc_rollup_originate_case; ] @@ -946,10 +926,6 @@ let equal_manager_kind : | Kind.Event_manager_kind, Kind.Event_manager_kind -> Some Eq | Kind.Event_manager_kind, _ -> None | Kind.Register_global_constant_manager_kind, _ -> None - | Kind.Set_deposits_limit_manager_kind, Kind.Set_deposits_limit_manager_kind - -> - Some Eq - | Kind.Set_deposits_limit_manager_kind, _ -> None | ( Kind.Increase_paid_storage_manager_kind, Kind.Increase_paid_storage_manager_kind ) -> Some Eq @@ -1512,17 +1488,6 @@ module Encoding = struct Some (op, res) | _ -> None) - let set_deposits_limit_case = - make_manager_case - Operation.Encoding.set_deposits_limit_case - Manager_result.set_deposits_limit_case - (function - | Contents_and_result - ( (Manager_operation {operation = Set_deposits_limit _; _} as op), - res ) -> - Some (op, res) - | _ -> None) - let increase_paid_storage_case = make_manager_case Operation.Encoding.increase_paid_storage_case @@ -1696,7 +1661,6 @@ let common_cases = origination_case; delegation_case; register_global_constant_case; - set_deposits_limit_case; increase_paid_storage_case; update_consensus_key_case; transfer_ticket_case; @@ -2100,32 +2064,6 @@ let kind_equal : } ) -> Some Eq | Manager_operation {operation = Register_global_constant _; _}, _ -> None - | ( Manager_operation {operation = Set_deposits_limit _; _}, - Manager_operation_result - {operation_result = Applied (Set_deposits_limit_result _); _} ) -> - Some Eq - | ( Manager_operation {operation = Set_deposits_limit _; _}, - Manager_operation_result - {operation_result = Backtracked (Set_deposits_limit_result _, _); _} ) - -> - Some Eq - | ( Manager_operation {operation = Set_deposits_limit _; _}, - Manager_operation_result - { - operation_result = - Failed (Alpha_context.Kind.Set_deposits_limit_manager_kind, _); - _; - } ) -> - Some Eq - | ( Manager_operation {operation = Set_deposits_limit _; _}, - Manager_operation_result - { - operation_result = - Skipped Alpha_context.Kind.Set_deposits_limit_manager_kind; - _; - } ) -> - Some Eq - | Manager_operation {operation = Set_deposits_limit _; _}, _ -> None | ( Manager_operation {operation = Increase_paid_storage _; _}, Manager_operation_result {operation_result = Applied (Increase_paid_storage_result _); _} ) -> diff --git a/src/proto_alpha/lib_protocol/apply_results.mli b/src/proto_alpha/lib_protocol/apply_results.mli index 1af423f19472b3687f42ee9674d8887866994a79..86695bcfcb6f5c3ed82d3aa399647e0c4f413190 100644 --- a/src/proto_alpha/lib_protocol/apply_results.mli +++ b/src/proto_alpha/lib_protocol/apply_results.mli @@ -160,10 +160,6 @@ and _ successful_manager_operation_result = global_address : Script_expr_hash.t; } -> Kind.register_global_constant successful_manager_operation_result - | Set_deposits_limit_result : { - consumed_gas : Gas.Arith.fp; - } - -> Kind.set_deposits_limit successful_manager_operation_result | Increase_paid_storage_result : { balance_updates : Receipt.balance_updates; consumed_gas : Gas.Arith.fp; diff --git a/src/proto_alpha/lib_protocol/delegate_sampler.ml b/src/proto_alpha/lib_protocol/delegate_sampler.ml index c48c469b45ac7cf5762c9beffd8bb06fe171af62..461ac0ced35d0a42bbc55143cb695aabb6e4374d 100644 --- a/src/proto_alpha/lib_protocol/delegate_sampler.ml +++ b/src/proto_alpha/lib_protocol/delegate_sampler.ml @@ -162,16 +162,9 @@ let get_stakes_for_selected_index ctxt index = ~f:(fun (delegate, staking_balance) (acc, total_stake) -> let delegate_contract = Contract_repr.Implicit delegate in let open Tez_repr in - let* frozen_deposits_limit = - Delegate_storage.frozen_deposits_limit ctxt delegate - in - let* frozen_deposits = + let* {current_amount = frozen; initial_amount = _} = Frozen_deposits_storage.get ctxt delegate_contract in - let frozen_deposits_limit = - match frozen_deposits_limit with Some fdp -> fdp | None -> max_mutez - in - let frozen = min frozen_deposits.current_amount frozen_deposits_limit in (* This subtraction may result in a negative value if tez were frozen after the snapshot. This is fine, they are then taken into account as frozen stake rather than delegated. *) diff --git a/src/proto_alpha/lib_protocol/delegate_services.ml b/src/proto_alpha/lib_protocol/delegate_services.ml index e53bc4f110b5ec6ec66196751e5aac1f0e78a805..8c370b12f405311e8e0fb53c007ebd3cb3eedfb9 100644 --- a/src/proto_alpha/lib_protocol/delegate_services.ml +++ b/src/proto_alpha/lib_protocol/delegate_services.ml @@ -113,7 +113,6 @@ type info = { current_frozen_deposits : Tez.t; frozen_deposits : Tez.t; staking_balance : Tez.t; - frozen_deposits_limit : Tez.t option; delegated_contracts : Contract.t list; delegated_balance : Tez.t; deactivated : bool; @@ -131,7 +130,6 @@ let info_encoding = current_frozen_deposits; frozen_deposits; staking_balance; - frozen_deposits_limit; delegated_contracts; delegated_balance; deactivated; @@ -144,7 +142,6 @@ let info_encoding = current_frozen_deposits, frozen_deposits, staking_balance, - frozen_deposits_limit, delegated_contracts, delegated_balance, deactivated, @@ -154,7 +151,6 @@ let info_encoding = current_frozen_deposits, frozen_deposits, staking_balance, - frozen_deposits_limit, delegated_contracts, delegated_balance, deactivated, @@ -165,7 +161,6 @@ let info_encoding = current_frozen_deposits; frozen_deposits; staking_balance; - frozen_deposits_limit; delegated_contracts; delegated_balance; deactivated; @@ -175,12 +170,11 @@ let info_encoding = pending_consensus_keys; }) (merge_objs - (obj9 + (obj8 (req "full_balance" Tez.encoding) (req "current_frozen_deposits" Tez.encoding) (req "frozen_deposits" Tez.encoding) (req "staking_balance" Tez.encoding) - (opt "frozen_deposits_limit" Tez.encoding) (req "delegated_contracts" (list Contract.encoding)) (req "delegated_balance" Tez.encoding) (req "deactivated" bool) @@ -320,15 +314,6 @@ module S = struct ~output:Tez.encoding RPC_path.(path / "staking_balance") - let frozen_deposits_limit = - RPC_service.get_service - ~description: - "Returns the frozen deposits limit for the given delegate or none if \ - no limit is set." - ~query:RPC_query.empty - ~output:(Data_encoding.option Tez.encoding) - RPC_path.(path / "frozen_deposits_limit") - let delegated_contracts = RPC_service.get_service ~description: @@ -459,7 +444,6 @@ let register () = Delegate.full_balance ctxt pkh >>=? fun full_balance -> Delegate.frozen_deposits ctxt pkh >>=? fun frozen_deposits -> Delegate.staking_balance ctxt pkh >>=? fun staking_balance -> - Delegate.frozen_deposits_limit ctxt pkh >>=? fun frozen_deposits_limit -> Delegate.delegated_contracts ctxt pkh >>= fun delegated_contracts -> Delegate.delegated_balance ctxt pkh >>=? fun delegated_balance -> Delegate.deactivated ctxt pkh >>=? fun deactivated -> @@ -475,7 +459,6 @@ let register () = current_frozen_deposits = frozen_deposits.current_amount; frozen_deposits = frozen_deposits.initial_amount; staking_balance; - frozen_deposits_limit; delegated_contracts; delegated_balance; deactivated; @@ -498,9 +481,6 @@ let register () = register1 ~chunked:false S.staking_balance (fun ctxt pkh () () -> check_delegate_registered ctxt pkh >>=? fun () -> Delegate.staking_balance ctxt pkh) ; - register1 ~chunked:false S.frozen_deposits_limit (fun ctxt pkh () () -> - check_delegate_registered ctxt pkh >>=? fun () -> - Delegate.frozen_deposits_limit ctxt pkh) ; register1 ~chunked:true S.delegated_contracts (fun ctxt pkh () () -> check_delegate_registered ctxt pkh >>=? fun () -> Delegate.delegated_contracts ctxt pkh >|= ok) ; @@ -561,9 +541,6 @@ let frozen_deposits ctxt block pkh = let staking_balance ctxt block pkh = RPC_context.make_call1 S.staking_balance ctxt block pkh () () -let frozen_deposits_limit ctxt block pkh = - RPC_context.make_call1 S.frozen_deposits_limit ctxt block pkh () () - let delegated_contracts ctxt block pkh = RPC_context.make_call1 S.delegated_contracts ctxt block pkh () () diff --git a/src/proto_alpha/lib_protocol/delegate_services.mli b/src/proto_alpha/lib_protocol/delegate_services.mli index ab203d80c58cb47efb9b1e13abbb737a3dbe7616..79a1a760ef50f442d41e4509735082a6db6435e4 100644 --- a/src/proto_alpha/lib_protocol/delegate_services.mli +++ b/src/proto_alpha/lib_protocol/delegate_services.mli @@ -58,7 +58,6 @@ type info = { current_frozen_deposits : Tez.t; frozen_deposits : Tez.t; staking_balance : Tez.t; - frozen_deposits_limit : Tez.t option; delegated_contracts : Contract.t list; delegated_balance : Tez.t; deactivated : bool; @@ -100,12 +99,6 @@ val staking_balance : Signature.Public_key_hash.t -> Tez.t shell_tzresult Lwt.t -val frozen_deposits_limit : - 'a #RPC_context.simple -> - 'a -> - Signature.Public_key_hash.t -> - Tez.t option shell_tzresult Lwt.t - val delegated_contracts : 'a #RPC_context.simple -> 'a -> diff --git a/src/proto_alpha/lib_protocol/delegate_storage.ml b/src/proto_alpha/lib_protocol/delegate_storage.ml index 43a9df601901e293fabcdf55711d51f52dc780e6..f0d8f3e861fe03a80eeb3e1691f72af481c660cf 100644 --- a/src/proto_alpha/lib_protocol/delegate_storage.ml +++ b/src/proto_alpha/lib_protocol/delegate_storage.ml @@ -212,17 +212,6 @@ let fold = Storage.Delegates.fold let list = Storage.Delegates.elements -let frozen_deposits_limit ctxt delegate = - Storage.Contract.Frozen_deposits_limit.find - ctxt - (Contract_repr.Implicit delegate) - -let set_frozen_deposits_limit ctxt delegate limit = - Storage.Contract.Frozen_deposits_limit.add_or_remove - ctxt - (Contract_repr.Implicit delegate) - limit - let frozen_deposits ctxt delegate = Frozen_deposits_storage.get ctxt (Contract_repr.Implicit delegate) diff --git a/src/proto_alpha/lib_protocol/delegate_storage.mli b/src/proto_alpha/lib_protocol/delegate_storage.mli index b4306b611057363849c1a3ed1489b2a57b79e3c4..a24132e3a9ed3c85b439f35d0f7259b6e6e95321 100644 --- a/src/proto_alpha/lib_protocol/delegate_storage.mli +++ b/src/proto_alpha/lib_protocol/delegate_storage.mli @@ -31,7 +31,6 @@ It also groups "trivial" getters/setters related to delegates. It is responsible for maintaining the following tables: - - {!Storage.Contract.Frozen_deposits_limit} - {!Storage.Delegates} *) @@ -101,17 +100,6 @@ val fold : (** List all registered delegates. *) val list : Raw_context.t -> Signature.Public_key_hash.t list Lwt.t -val frozen_deposits_limit : - Raw_context.t -> - Signature.Public_key_hash.t -> - Tez_repr.t option tzresult Lwt.t - -val set_frozen_deposits_limit : - Raw_context.t -> - Signature.Public_key_hash.t -> - Tez_repr.t option -> - Raw_context.t Lwt.t - (** Returns a delegate's frozen deposits, both the current amount and the initial freezed amount. diff --git a/src/proto_alpha/lib_protocol/operation_repr.ml b/src/proto_alpha/lib_protocol/operation_repr.ml index 3fa30abdd7b663797bdbee4b3f135db1e2471deb..b0907152784f611b20e3eb30f21394b5f63b4293 100644 --- a/src/proto_alpha/lib_protocol/operation_repr.ml +++ b/src/proto_alpha/lib_protocol/operation_repr.ml @@ -72,8 +72,6 @@ module Kind = struct type event = Event_kind - type set_deposits_limit = Set_deposits_limit_kind - type increase_paid_storage = Increase_paid_storage_kind type update_consensus_key = Update_consensus_key_kind @@ -118,7 +116,6 @@ module Kind = struct | Delegation_manager_kind : delegation manager | Event_manager_kind : event manager | Register_global_constant_manager_kind : register_global_constant manager - | 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 | Transfer_ticket_manager_kind : transfer_ticket manager @@ -329,9 +326,6 @@ and _ manager_operation = value : Script_repr.lazy_expr; } -> Kind.register_global_constant manager_operation - | Set_deposits_limit : - Tez_repr.t option - -> Kind.set_deposits_limit manager_operation | Increase_paid_storage : { amount_in_bytes : Z.t; destination : Contract_hash.t; @@ -418,7 +412,6 @@ let manager_kind : type kind. kind manager_operation -> kind Kind.manager = | Origination _ -> Kind.Origination_manager_kind | Delegation _ -> Kind.Delegation_manager_kind | Register_global_constant _ -> Kind.Register_global_constant_manager_kind - | 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 | Transfer_ticket _ -> Kind.Transfer_ticket_manager_kind @@ -687,18 +680,7 @@ module Encoding = struct inj = (fun value -> Register_global_constant {value}); } - let set_deposits_limit_case = - MCase - { - tag = 5; - name = "set_deposits_limit"; - encoding = obj1 (opt "limit" Tez_repr.encoding); - select = - (function - | Manager (Set_deposits_limit _ as op) -> Some op | _ -> None); - proj = (function Set_deposits_limit key -> key); - inj = (fun key -> Set_deposits_limit key); - } + (* Tag 5 was for Set_deposits_limit. *) let increase_paid_storage_case = MCase @@ -1465,8 +1447,7 @@ module Encoding = struct let register_global_constant_case = make_manager_case 111 Manager_operations.register_global_constant_case - let set_deposits_limit_case = - make_manager_case 112 Manager_operations.set_deposits_limit_case + (* 112 was for Set_deposits_limit. *) let increase_paid_storage_case = make_manager_case 113 Manager_operations.increase_paid_storage_case @@ -1554,7 +1535,6 @@ module Encoding = struct PCase transaction_case; PCase origination_case; PCase delegation_case; - PCase set_deposits_limit_case; PCase increase_paid_storage_case; PCase update_consensus_key_case; PCase drain_delegate_case; @@ -2007,8 +1987,6 @@ let equal_manager_operation_kind : | Delegation _, _ -> None | Register_global_constant _, Register_global_constant _ -> Some Eq | Register_global_constant _, _ -> None - | Set_deposits_limit _, Set_deposits_limit _ -> Some Eq - | Set_deposits_limit _, _ -> None | Increase_paid_storage _, Increase_paid_storage _ -> Some Eq | Increase_paid_storage _, _ -> None | Update_consensus_key _, Update_consensus_key _ -> Some Eq diff --git a/src/proto_alpha/lib_protocol/operation_repr.mli b/src/proto_alpha/lib_protocol/operation_repr.mli index 0a5f401bc64037735c15a25325da92d8df526cd1..26f26e01eaedddd8c31f78c35043642084ea97ad 100644 --- a/src/proto_alpha/lib_protocol/operation_repr.mli +++ b/src/proto_alpha/lib_protocol/operation_repr.mli @@ -106,8 +106,6 @@ module Kind : sig type event = Event_kind - type set_deposits_limit = Set_deposits_limit_kind - type increase_paid_storage = Increase_paid_storage_kind type update_consensus_key = Update_consensus_key_kind @@ -152,7 +150,6 @@ module Kind : sig | Delegation_manager_kind : delegation manager | Event_manager_kind : event manager | Register_global_constant_manager_kind : register_global_constant manager - | 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 | Transfer_ticket_manager_kind : transfer_ticket manager @@ -373,12 +370,6 @@ and _ manager_operation = value : Script_repr.lazy_expr; } -> Kind.register_global_constant manager_operation - (* [Set_deposits_limit] sets an optional limit for frozen deposits - of a contract at a lower value than the maximum limit. When None, - the limit in unset back to the default maximum limit. *) - | Set_deposits_limit : - Tez_repr.t option - -> Kind.set_deposits_limit manager_operation (* [Increase_paid_storage] allows a sender to pay to increase the paid storage of some contract by some amount. *) | Increase_paid_storage : { @@ -730,8 +721,6 @@ module Encoding : sig val register_global_constant_case : Kind.register_global_constant Kind.manager case - val set_deposits_limit_case : Kind.set_deposits_limit Kind.manager case - val increase_paid_storage_case : Kind.increase_paid_storage Kind.manager case val transfer_ticket_case : Kind.transfer_ticket Kind.manager case @@ -790,8 +779,6 @@ module Encoding : sig val register_global_constant_case : Kind.register_global_constant case - val set_deposits_limit_case : Kind.set_deposits_limit case - val increase_paid_storage_case : Kind.increase_paid_storage case val transfer_ticket_case : Kind.transfer_ticket case diff --git a/src/proto_alpha/lib_protocol/test/helpers/block.ml b/src/proto_alpha/lib_protocol/test/helpers/block.ml index b023aac8bd406f6a17b50bb46fc104a1576e51b7..dcf80e50fd460e2f83cc42ad37abfc7824a9436c 100644 --- a/src/proto_alpha/lib_protocol/test/helpers/block.ml +++ b/src/proto_alpha/lib_protocol/test/helpers/block.ml @@ -929,11 +929,11 @@ let bake_n_with_all_balance_updates ?(baking_mode = Application) ?policy match r with | Transaction_result (Transaction_to_sc_rollup_result _) | Reveal_result _ | Delegation_result _ - | Update_consensus_key_result _ | Set_deposits_limit_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 _ + | Update_consensus_key_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 _ -> @@ -967,7 +967,6 @@ let bake_n_with_origination_results ?(baking_mode = Application) ?policy n b = | Successful_manager_result (Update_consensus_key_result _) | Successful_manager_result (Transaction_result _) | Successful_manager_result (Register_global_constant_result _) - | Successful_manager_result (Set_deposits_limit_result _) | Successful_manager_result (Increase_paid_storage_result _) | Successful_manager_result (Transfer_ticket_result _) | Successful_manager_result (Dal_publish_slot_header_result _) diff --git a/src/proto_alpha/lib_protocol/test/helpers/context.ml b/src/proto_alpha/lib_protocol/test/helpers/context.ml index 07d05906175a2cbde9b97376bfe431e12f20e1b5..229bdbbbdd3bd084a386544fae82e564afd3e749 100644 --- a/src/proto_alpha/lib_protocol/test/helpers/context.ml +++ b/src/proto_alpha/lib_protocol/test/helpers/context.ml @@ -367,7 +367,6 @@ module Delegate = struct current_frozen_deposits : Tez.t; frozen_deposits : Tez.t; staking_balance : Tez.t; - frozen_deposits_limit : Tez.t option; delegated_contracts : Alpha_context.Contract.t list; delegated_balance : Tez.t; deactivated : bool; @@ -390,9 +389,6 @@ module Delegate = struct let staking_balance ctxt pkh = Delegate_services.staking_balance rpc_ctxt ctxt pkh - let frozen_deposits_limit ctxt pkh = - Delegate_services.frozen_deposits_limit rpc_ctxt ctxt pkh - let deactivated ctxt pkh = Delegate_services.deactivated rpc_ctxt ctxt pkh let voting_info ctxt d = Alpha_services.Delegate.voting_info rpc_ctxt ctxt d diff --git a/src/proto_alpha/lib_protocol/test/helpers/context.mli b/src/proto_alpha/lib_protocol/test/helpers/context.mli index bc011b463bb94396a42ad753b3565bc345001820..9a718bc9e497aadaece20c7d97abf01f87b70ac2 100644 --- a/src/proto_alpha/lib_protocol/test/helpers/context.mli +++ b/src/proto_alpha/lib_protocol/test/helpers/context.mli @@ -190,7 +190,6 @@ module Delegate : sig current_frozen_deposits : Tez.t; frozen_deposits : Tez.t; staking_balance : Tez.t; - frozen_deposits_limit : Tez.t option; delegated_contracts : Alpha_context.Contract.t list; delegated_balance : Tez.t; deactivated : bool; @@ -212,9 +211,6 @@ module Delegate : sig val staking_balance : t -> public_key_hash -> Tez.t tzresult Lwt.t - val frozen_deposits_limit : - t -> public_key_hash -> Tez.t option tzresult Lwt.t - val deactivated : t -> public_key_hash -> bool tzresult Lwt.t val voting_info : t -> public_key_hash -> Vote.delegate_info tzresult Lwt.t diff --git a/src/proto_alpha/lib_protocol/test/helpers/op.ml b/src/proto_alpha/lib_protocol/test/helpers/op.ml index a1ac60a7ec25172cd82779829f2116c01f0dff42..cdaee86a52ce854011d6b5666cc3de39f7ca61dd 100644 --- a/src/proto_alpha/lib_protocol/test/helpers/op.ml +++ b/src/proto_alpha/lib_protocol/test/helpers/op.ml @@ -605,22 +605,6 @@ let delegation ?force_reveal ?fee ?gas_limit ?counter ?storage_limit ctxt source Context.Contract.manager ctxt source >|=? fun account -> sign account.sk (Context.branch ctxt) sop -let set_deposits_limit ?force_reveal ?fee ?gas_limit ?storage_limit ?counter - ctxt source limit = - let top = Set_deposits_limit limit in - manager_operation - ?force_reveal - ?fee - ?counter - ?storage_limit - ?gas_limit - ~source - ctxt - top - >>=? fun sop -> - Context.Contract.manager ctxt source >|=? fun account -> - sign account.sk (Context.branch ctxt) sop - let increase_paid_storage ?force_reveal ?counter ?fee ?gas_limit ?storage_limit ctxt ~source ~destination (amount : Z.t) = let top = Increase_paid_storage {amount_in_bytes = amount; destination} in diff --git a/src/proto_alpha/lib_protocol/test/helpers/op.mli b/src/proto_alpha/lib_protocol/test/helpers/op.mli index 19a6604b3b6b1e74ca8e69ae7bfb0ebfdd3f3e65..39fb652e5dc67f37ec23d423c7f41689343e6b6a 100644 --- a/src/proto_alpha/lib_protocol/test/helpers/op.mli +++ b/src/proto_alpha/lib_protocol/test/helpers/op.mli @@ -174,17 +174,6 @@ val delegation : public_key_hash option -> Operation.packed tzresult Lwt.t -val set_deposits_limit : - ?force_reveal:bool -> - ?fee:Tez.tez -> - ?gas_limit:gas_limit -> - ?storage_limit:Z.t -> - ?counter:Manager_counter.t -> - Context.t -> - Contract.t -> - Tez.tez option -> - Operation.packed tzresult Lwt.t - val increase_paid_storage : ?force_reveal:bool -> ?counter:Manager_counter.t -> diff --git a/src/proto_alpha/lib_protocol/test/helpers/operation_generator.ml b/src/proto_alpha/lib_protocol/test/helpers/operation_generator.ml index 1f7b9ff708c7a80dd8a9fe6c5f9207cd2daf21ec..9141c945a92185acbc88129b07c9f7bad8efbd38 100644 --- a/src/proto_alpha/lib_protocol/test/helpers/operation_generator.ml +++ b/src/proto_alpha/lib_protocol/test/helpers/operation_generator.ml @@ -70,7 +70,6 @@ let manager_kinds = `KTransaction; `KOrigination; `KDelegation; - `KSet_deposits_limit; `KIncrease_paid_storage; `KRegister_global_constant; `KTransfer_ticket; @@ -502,11 +501,6 @@ let generate_increase_paid_storage = let+ destination = random_contract_hash in Increase_paid_storage {amount_in_bytes; destination} -let generate_set_deposits_limit = - let open QCheck2.Gen in - let+ amount_opt = option gen_amount in - Set_deposits_limit amount_opt - let generate_register_global_constant = let value = Script_repr.lazy_expr (Expr.from_string "Pair 1 2") in QCheck2.Gen.pure (Register_global_constant {value}) @@ -605,8 +599,6 @@ let generator_of ?source = function | `KReveal -> generate_manager_operation ?source generate_reveal | `KTransaction -> generate_manager_operation ?source generate_transaction | `KOrigination -> generate_manager_operation ?source generate_origination - | `KSet_deposits_limit -> - generate_manager_operation ?source generate_set_deposits_limit | `KIncrease_paid_storage -> generate_manager_operation ?source generate_increase_paid_storage | `KDelegation -> generate_manager_operation ?source generate_delegation diff --git a/src/proto_alpha/lib_protocol/test/integration/consensus/test_frozen_deposits.ml b/src/proto_alpha/lib_protocol/test/integration/consensus/test_frozen_deposits.ml index a006256e14cd03bdf4adf15eeaaebc25edc42dbd..b078130d01ddfc713fe70d3f330bba009ba91f23 100644 --- a/src/proto_alpha/lib_protocol/test/integration/consensus/test_frozen_deposits.ml +++ b/src/proto_alpha/lib_protocol/test/integration/consensus/test_frozen_deposits.ml @@ -28,12 +28,11 @@ Component: Protocol (frozen_deposits) Invocation: dune exec src/proto_alpha/lib_protocol/test/integration/consensus/main.exe \ -- --file test_frozen_deposits.ml - Subject: consistency of frozen deposits and the [set_deposits_limit] operation + Subject: consistency of frozen deposits *) open Protocol open Alpha_context -open Test_tez let constants = { @@ -128,197 +127,6 @@ let test_invariants () = (* Frozen deposits aren't changed by delegation. *) Assert.equal_tez ~loc:__LOC__ new_frozen_deposits frozen_deposits -let test_set_limit balance_percentage () = - Context.init_with_constants2 constants >>=? fun (genesis, contracts) -> - let (contract1, account1), (_contract2, account2) = - get_first_2_accounts_contracts contracts - in - (Context.Delegate.frozen_deposits_limit (B genesis) account1 >>=? function - | Some _ -> Alcotest.fail "unexpected deposits limit" - | None -> return_unit) - >>=? fun () -> - (* Test deposit consistency before and after first cycle *) - Context.Delegate.full_balance (B genesis) account1 >>=? fun full_balance -> - Context.Delegate.current_frozen_deposits (B genesis) account1 - >>=? fun frozen_deposits -> - let expected_deposits = - full_balance /! Int64.of_int (constants.delegation_over_baking_limit + 1) - in - Assert.equal_tez ~loc:__LOC__ frozen_deposits expected_deposits >>=? fun () -> - (* Bake until end of first cycle *) - Block.bake_until_cycle_end genesis >>=? fun b -> - Context.Delegate.full_balance (B genesis) account1 >>=? fun full_balance -> - Context.Delegate.current_frozen_deposits (B genesis) account1 - >>=? fun frozen_deposits -> - let expected_deposits = - full_balance /! Int64.of_int (constants.delegation_over_baking_limit + 1) - in - Assert.equal_tez ~loc:__LOC__ frozen_deposits expected_deposits >>=? fun () -> - (* set deposits limit to balance_percentage out of the balance *) - let limit = - Test_tez.(full_balance *! Int64.of_int balance_percentage /! 100L) - in - Op.set_deposits_limit (B genesis) contract1 (Some limit) >>=? fun operation -> - Block.bake ~policy:(By_account account2) ~operation b >>=? fun b -> - (Context.Delegate.frozen_deposits_limit (B b) account1 >>=? function - | Some set_limit -> Assert.equal_tez ~loc:__LOC__ set_limit limit - | None -> Alcotest.fail "unexpected absence of deposits limit") - >>=? fun () -> - (* the frozen deposits limit affects the active stake for cycles starting with c + - preserved_cycles + 1; the new active stake is taken into account when - computing the frozen deposits for cycle c+1 already, however the user may see - an update to its frozen deposits at cycle c + preserved_cycles + - max_slashing_period at the latest (because up to that cycle the frozen - deposits also depend on the active stake at cycles before cycle c+1). *) - let expected_number_of_cycles_with_previous_deposit = - constants.preserved_cycles + constants.max_slashing_period - in - Block.bake_until_n_cycle_end - ~policy:(By_account account2) - (expected_number_of_cycles_with_previous_deposit - 1) - b - >>=? fun b -> - Context.Delegate.current_frozen_deposits (B b) account1 - >>=? fun frozen_deposits -> - Assert.not_equal_tez ~loc:__LOC__ frozen_deposits Tez.zero >>=? fun () -> - Block.bake_until_cycle_end ~policy:(By_account account2) b >>=? fun b -> - Context.Delegate.current_frozen_deposits (B b) account1 - >>=? fun frozen_deposits -> - Assert.equal_tez ~loc:__LOC__ frozen_deposits limit - -let test_unset_limit () = - Context.init_with_constants2 constants >>=? fun (genesis, contracts) -> - let (contract1, account1), (_contract2, account2) = - get_first_2_accounts_contracts contracts - in - (* set the limit to 0 *) - Op.set_deposits_limit (B genesis) contract1 (Some Tez.zero) - >>=? fun operation -> - Block.bake ~policy:(By_account account2) ~operation genesis >>=? fun b -> - (Context.Delegate.frozen_deposits_limit (B b) account1 >>=? function - | Some set_limit -> Assert.equal_tez ~loc:__LOC__ set_limit Tez.zero - | None -> Alcotest.fail "unexpected absence of deposits limit") - >>=? fun () -> - let expected_number_of_cycles_with_previous_deposit = - constants.preserved_cycles + constants.max_slashing_period - in - Block.bake_until_n_cycle_end - ~policy:(By_account account2) - expected_number_of_cycles_with_previous_deposit - b - >>=? fun b -> - Context.Delegate.current_frozen_deposits (B b) account1 - >>=? fun frozen_deposits_at_b -> - (* after [expected_number_of_cycles_with_previous_deposit] cycles - the 0 limit is reflected in the deposit which becomes 0 itself *) - Assert.equal_tez ~loc:__LOC__ frozen_deposits_at_b Tez.zero >>=? fun () -> - (* unset the 0 limit *) - Op.set_deposits_limit (B b) contract1 None >>=? fun operation -> - Block.bake ~policy:(By_account account2) ~operation b >>=? fun b -> - (Context.Delegate.frozen_deposits_limit (B b) account1 >>=? function - | Some _ -> Alcotest.fail "unexpected deposits limit" - | None -> return_unit) - >>=? fun () -> - (* removing the 0 limit is visible once the cycle ends *) - Block.bake_until_cycle_end ~policy:(By_account account2) b >>=? fun bfin -> - Context.Delegate.current_frozen_deposits (B bfin) account1 - >>=? fun frozen_deposits_at_bfin -> - (* without a limit and without manual staking, the new deposit is still zero; - note that account1 hasn't baked any block. *) - Assert.equal_tez ~loc:__LOC__ frozen_deposits_at_bfin Tez.zero >>=? fun () -> - return_unit - -let test_cannot_bake_with_zero_deposits_limit () = - Context.init_with_constants2 constants >>=? fun (genesis, contracts) -> - let (contract1, account1), (_contract2, account2) = - get_first_2_accounts_contracts contracts - in - (* N.B. there is no non-zero frozen deposits value for which one cannot bake: - even with a small deposit one can still bake, though with a smaller probability - (because the frozen deposits value impacts the active stake and the active - stake is the one used to determine baking/endorsing rights. *) - Op.set_deposits_limit (B genesis) contract1 (Some Tez.zero) - >>=? fun operation -> - Block.bake ~policy:(By_account account2) ~operation genesis >>=? fun b -> - let expected_number_of_cycles_with_previous_deposit = - constants.preserved_cycles + constants.max_slashing_period - 1 - in - Block.bake_until_n_cycle_end - ~policy:(By_account account2) - expected_number_of_cycles_with_previous_deposit - b - >>=? fun b -> - Block.bake ~policy:(By_account account1) b >>= fun b1 -> - (* by now, the active stake of account1 is 0 so it no longer has slots, thus it - cannot be a proposer, thus it cannot bake. Precisely, bake fails because - get_next_baker_by_account fails with "No slots found" *) - Assert.error ~loc:__LOC__ b1 (fun _ -> true) >>=? fun () -> - Block.bake_until_cycle_end ~policy:(By_account account2) b >>=? fun b -> - (* after one cycle is passed, the frozen deposit window has passed - and the frozen deposits should now be effectively 0. *) - Context.Delegate.current_frozen_deposits (B b) account1 >>=? fun fd -> - Assert.equal_tez ~loc:__LOC__ fd Tez.zero >>=? fun () -> - Block.bake ~policy:(By_account account1) b >>= fun b1 -> - (* don't know why the zero frozen deposits error is not caught here *) - (* Assert.proto_error_with_info ~loc:__LOC__ b1 "Zero frozen deposits" *) - Assert.error ~loc:__LOC__ b1 (fun _ -> true) - -let test_may_not_bake_again_after_full_deposit_slash () = - let order_ops op1 op2 = - let oph1 = Operation.hash op1 in - let oph2 = Operation.hash op2 in - let c = Operation_hash.compare oph1 oph2 in - if c < 0 then (op1, op2) else (op2, op1) - in - Context.init_with_constants2 constants >>=? fun (genesis, contracts) -> - let (good_contract, good_account), (slashed_contract, slashed_account) = - get_first_2_accounts_contracts contracts - in - Op.transaction - (B genesis) - good_contract - slashed_contract - Alpha_context.Tez.one_cent - >>=? fun operation -> - Block.bake ~policy:(By_account slashed_account) ~operation genesis - >>=? fun blk_a -> - Block.bake ~policy:(By_account slashed_account) genesis >>=? fun blk_b -> - Op.raw_preendorsement ~delegate:slashed_account blk_a >>=? fun preendo1 -> - Op.raw_preendorsement ~delegate:slashed_account blk_b >>=? fun preendo2 -> - let preendo1, preendo2 = order_ops preendo1 preendo2 in - let double_preendo_op = - Op.double_preendorsement (B blk_a) preendo1 preendo2 - in - Block.bake - ~policy:(By_account good_account) - ~operation:double_preendo_op - blk_a - >>=? fun b -> - Op.transaction (B b) good_contract slashed_contract Alpha_context.Tez.one_cent - >>=? fun operation -> - Block.bake ~policy:(By_account slashed_account) ~operation b >>=? fun blk_a -> - Block.bake ~policy:(By_account slashed_account) b >>=? fun blk_b -> - Op.raw_endorsement ~delegate:slashed_account blk_a >>=? fun endo1 -> - Op.raw_endorsement ~delegate:slashed_account blk_b >>=? fun endo2 -> - let endo1, endo2 = order_ops endo1 endo2 in - let double_endo_op = Op.double_endorsement (B blk_a) endo1 endo2 in - Block.bake ~policy:(By_account good_account) ~operation:double_endo_op b - >>=? fun b -> - (* Assert that the [slashed_account]'s deposit is now 0 *) - Context.Delegate.current_frozen_deposits (B b) slashed_account >>=? fun fd -> - Assert.equal_tez ~loc:__LOC__ fd Tez.zero >>=? fun () -> - (* Check that we are not allowed to bake with [slashed_account] *) - Block.bake ~policy:(By_account slashed_account) b >>= fun res -> - Assert.error ~loc:__LOC__ res (fun _ -> true) >>=? fun () -> - Block.bake_until_cycle_end ~policy:(By_account good_account) b >>=? fun b -> - (* Assert that the [slashed_account]'s deposit is still zero without manual - staking. *) - Context.Delegate.current_frozen_deposits (B b) slashed_account >>=? fun fd -> - Assert.equal_tez ~loc:__LOC__ fd Tez.zero >>=? fun () -> - (* Check that we are still not allowed to bake with [slashed_account] *) - Block.bake ~policy:(By_account slashed_account) b >>= fun res -> - Assert.error ~loc:__LOC__ res (fun _ -> true) >>=? fun () -> return_unit - let test_deposits_after_stake_removal () = Context.init_with_constants2 constants >>=? fun (genesis, contracts) -> let (contract1, account1), (contract2, account2) = @@ -561,78 +369,6 @@ let test_frozen_deposits_with_overdelegation () = time *) loop b cycles_to_bake >>=? fun (_b : Block.t) -> return_unit -let test_set_limit_with_overdelegation () = - let constants = {constants with delegation_over_baking_limit = 9} in - Context.init_with_constants2 constants >>=? fun (genesis, contracts) -> - let (contract1, account1), (contract2, account2) = - get_first_2_accounts_contracts contracts - in - (* - [account1] and [account2] will give 80% of their balance to - [new_account] - - [new_account] will overdelegate to [account1] and [account1] will set - its frozen deposits limit to 15% of its stake *) - Context.Delegate.current_frozen_deposits (B genesis) account1 - >>=? fun initial_frozen_deposits -> - Context.Delegate.staking_balance (B genesis) account1 - >>=? fun initial_staking_balance -> - Context.Delegate.staking_balance (B genesis) account2 - >>=? fun initial_staking_balance' -> - let amount = Test_tez.(initial_staking_balance *! 8L /! 10L) in - let amount' = Test_tez.(initial_staking_balance' *! 8L /! 10L) in - let limit = Test_tez.(initial_staking_balance *! 15L /! 100L) in - let new_account = (Account.new_account ()).pkh in - let new_contract = Contract.Implicit new_account in - Op.transaction ~force_reveal:true (B genesis) contract1 new_contract amount - >>=? fun transfer1 -> - Op.transaction ~force_reveal:true (B genesis) contract2 new_contract amount' - >>=? fun transfer2 -> - Block.bake ~operations:[transfer1; transfer2] genesis >>=? fun b -> - Op.set_deposits_limit (B b) contract1 (Some limit) >>=? fun set_deposits -> - Block.bake ~operation:set_deposits b >>=? fun b -> - let expected_new_staking_balance = - Test_tez.(initial_staking_balance -! amount) - in - Context.Delegate.staking_balance (B b) account1 - >>=? fun new_staking_balance -> - Assert.equal_tez ~loc:__LOC__ new_staking_balance expected_new_staking_balance - >>=? fun () -> - let expected_new_staking_balance' = - Test_tez.(initial_staking_balance' -! amount') - in - Context.Delegate.staking_balance (B b) account2 - >>=? fun new_staking_balance' -> - Assert.equal_tez - ~loc:__LOC__ - new_staking_balance' - expected_new_staking_balance' - >>=? fun () -> - Op.delegation ~force_reveal:true (B b) new_contract (Some account1) - >>=? fun delegation -> - Block.bake ~operation:delegation b >>=? fun b -> - (* Finish the cycle. account1's frozen deposits aren't increased - automatically. *) - Block.bake_until_cycle_end b >>=? fun b -> - let expected_new_frozen_deposits = initial_frozen_deposits in - Context.Delegate.current_frozen_deposits (B b) account1 - >>=? fun frozen_deposits -> - Assert.equal_tez ~loc:__LOC__ frozen_deposits expected_new_frozen_deposits - >>=? fun () -> - let cycles_to_bake = - 2 * (constants.preserved_cycles + constants.max_slashing_period) - in - let rec loop b n = - if n = 0 then return b - else - Block.bake_until_cycle_end ~policy:(By_account account1) b >>=? fun b -> - Context.Delegate.current_frozen_deposits (B b) account1 - >>=? fun frozen_deposits -> - Assert.equal_tez ~loc:__LOC__ frozen_deposits expected_new_frozen_deposits - >>=? fun () -> loop b (pred n) - in - (* Check that frozen deposits do not change for a sufficient period of - time *) - loop b cycles_to_bake >>=? fun (_b : Block.t) -> return_unit - (** This test fails when [to_cycle] in [Delegate.freeze_deposits] is smaller than [new_cycle + preserved_cycles]. *) let test_error_is_thrown_when_smaller_upper_bound_for_frozen_window () = @@ -687,17 +423,6 @@ let tests = Tztest. [ tztest "invariants" `Quick test_invariants; - tztest "set deposits limit to 0%" `Quick (test_set_limit 0); - tztest "set deposits limit to 5%" `Quick (test_set_limit 5); - tztest "unset deposits limit" `Quick test_unset_limit; - tztest - "cannot bake with zero deposits limit" - `Quick - test_cannot_bake_with_zero_deposits_limit; - tztest - "may not bake again after full slash" - `Quick - test_may_not_bake_again_after_full_deposit_slash; tztest "deposits after stake removal" `Quick @@ -710,14 +435,6 @@ let tests = "frozen deposits with delegation" `Quick test_frozen_deposits_with_delegation; - tztest - "frozen deposits with overdelegation" - `Quick - test_frozen_deposits_with_overdelegation; - tztest - "set limit with overdelegation" - `Quick - test_set_limit_with_overdelegation; tztest "error is thrown when the frozen window is smaller" `Quick diff --git a/src/proto_alpha/lib_protocol/test/integration/validate/manager_operation_helpers.ml b/src/proto_alpha/lib_protocol/test/integration/validate/manager_operation_helpers.ml index f9cb816f05e749511fb93d3ccd0eee07656332a7..ef3d2e7aa622e727ee8666fc1702c102c673fb66 100644 --- a/src/proto_alpha/lib_protocol/test/integration/validate/manager_operation_helpers.ml +++ b/src/proto_alpha/lib_protocol/test/integration/validate/manager_operation_helpers.ml @@ -80,7 +80,6 @@ type manager_operation_kind = | K_Delegation | K_Undelegation | K_Self_delegation - | K_Set_deposits_limit | K_Update_consensus_key | K_Increase_paid_storage | K_Reveal @@ -171,7 +170,6 @@ let kind_to_string = function | K_Delegation -> "Delegation" | K_Undelegation -> "Undelegation" | K_Self_delegation -> "Self-delegation" - | K_Set_deposits_limit -> "Set deposits limit" | K_Update_consensus_key -> "Update consensus key" | K_Origination -> "Origination" | K_Register_global_constant -> "Register global constant" @@ -689,17 +687,6 @@ let mk_register_global_constant (oinfos : operation_req) (infos : infos) = ~source:(contract_of (get_source infos)) ~value:(Script_repr.lazy_expr (Expr.from_string "Pair 1 2")) -let mk_set_deposits_limit (oinfos : operation_req) (infos : infos) = - Op.set_deposits_limit - ?force_reveal:oinfos.force_reveal - ?fee:oinfos.fee - ?gas_limit:oinfos.gas_limit - ?storage_limit:oinfos.storage_limit - ?counter:oinfos.counter - (B infos.ctxt.block) - (contract_of (get_source infos)) - None - let mk_update_consensus_key (oinfos : operation_req) (infos : infos) = Op.update_consensus_key ?force_reveal:oinfos.force_reveal @@ -1012,7 +999,6 @@ let select_op (op_req : operation_req) (infos : infos) = | K_Delegation -> mk_delegation | K_Undelegation -> mk_undelegation | K_Self_delegation -> mk_self_delegation - | K_Set_deposits_limit -> mk_set_deposits_limit | K_Update_consensus_key -> mk_update_consensus_key | K_Increase_paid_storage -> mk_increase_paid_storage | K_Reveal -> mk_reveal @@ -1378,7 +1364,6 @@ let subjects = K_Delegation; K_Undelegation; K_Self_delegation; - K_Set_deposits_limit; K_Update_consensus_key; K_Increase_paid_storage; K_Reveal; @@ -1398,10 +1383,10 @@ let subjects = ] let is_consumer = function - | K_Set_deposits_limit | K_Update_consensus_key | K_Increase_paid_storage - | K_Reveal | K_Self_delegation | K_Delegation | K_Undelegation - | K_Sc_rollup_add_messages | K_Sc_rollup_origination | K_Sc_rollup_refute - | K_Sc_rollup_timeout | K_Sc_rollup_cement | K_Sc_rollup_publish + | K_Update_consensus_key | K_Increase_paid_storage | K_Reveal + | K_Self_delegation | K_Delegation | K_Undelegation | K_Sc_rollup_add_messages + | K_Sc_rollup_origination | K_Sc_rollup_refute | K_Sc_rollup_timeout + | K_Sc_rollup_cement | K_Sc_rollup_publish | K_Sc_rollup_execute_outbox_message | K_Sc_rollup_recover_bond | K_Dal_publish_slot_header | K_Zk_rollup_origination | K_Zk_rollup_publish | K_Zk_rollup_update -> @@ -1418,9 +1403,8 @@ let revealed_subjects = let is_disabled flags = function | K_Transaction | K_Origination | K_Register_global_constant | K_Delegation - | K_Undelegation | K_Self_delegation | K_Set_deposits_limit - | K_Update_consensus_key | K_Increase_paid_storage | K_Reveal - | K_Transfer_ticket -> + | K_Undelegation | K_Self_delegation | K_Update_consensus_key + | K_Increase_paid_storage | K_Reveal | K_Transfer_ticket -> false | K_Sc_rollup_origination | K_Sc_rollup_publish | K_Sc_rollup_cement | K_Sc_rollup_add_messages | K_Sc_rollup_refute | K_Sc_rollup_timeout 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 3d0aaa65df45bc7357898fdef797cfab98edd6b6..78b62dac20217c4ee4469d1ceb6823a0faf9c609 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 @@ -63,7 +63,6 @@ let ensure_kind infos kind = | Delegation _, K_Undelegation | Delegation _, K_Self_delegation | Register_global_constant _, K_Register_global_constant - | Set_deposits_limit _, K_Set_deposits_limit | Update_consensus_key _, K_Update_consensus_key | Increase_paid_storage _, K_Increase_paid_storage | Transfer_ticket _, K_Transfer_ticket @@ -81,10 +80,10 @@ let ensure_kind infos kind = | Zk_rollup_update _, K_Zk_rollup_update -> return_unit | ( ( Transaction _ | Origination _ | Register_global_constant _ - | Delegation _ | Set_deposits_limit _ | Update_consensus_key _ - | 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 _ + | Delegation _ | Update_consensus_key _ | 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 2f3013ff01381d8a5f814e51b4cd5f25035402eb..11a9a5b8767a78e47f9968a916841a9140e314a9 100644 --- a/src/proto_alpha/lib_protocol/validate.ml +++ b/src/proto_alpha/lib_protocol/validate.ml @@ -2089,8 +2089,7 @@ module Manager = struct return_unit | Delegation (Some pkh) -> Delegate.check_not_tz4 pkh | Update_consensus_key pk -> Delegate.Consensus_key.check_not_tz4 pk - | Delegation None | Set_deposits_limit _ | Increase_paid_storage _ -> - return_unit + | Delegation None | Increase_paid_storage _ -> return_unit | 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 diff --git a/src/proto_alpha/lib_sc_rollup_node/daemon.ml b/src/proto_alpha/lib_sc_rollup_node/daemon.ml index 85d4b0738ea88dbcdd6cd2f137bfdafa79c13444..689d8e124ff60837245c188fc26c16809379988a 100644 --- a/src/proto_alpha/lib_sc_rollup_node/daemon.ml +++ b/src/proto_alpha/lib_sc_rollup_node/daemon.ml @@ -232,7 +232,7 @@ let process_l1_operation (type kind) node_ctxt (head : Layer1.header) ~source Sc_rollup.Address.(rollup = node_ctxt.Node_context.rollup_address) | Dal_publish_slot_header _ -> true | Reveal _ | Transaction _ | Origination _ | Delegation _ - | Update_consensus_key _ | Register_global_constant _ | Set_deposits_limit _ + | Update_consensus_key _ | Register_global_constant _ | Increase_paid_storage _ | Transfer_ticket _ | Sc_rollup_originate _ | Zk_rollup_origination _ | Zk_rollup_publish _ | Zk_rollup_update _ -> false diff --git a/tezt/tests/deposits_limit.ml b/tezt/tests/deposits_limit.ml index 630e90e90ef217285ae4d338a7bda8963280b6f1..a2e9eeb61a6c9e3e684cff8eed96afc9558e07d7 100644 --- a/tezt/tests/deposits_limit.ml +++ b/tezt/tests/deposits_limit.ml @@ -34,6 +34,7 @@ let test_set_deposits_limit = ~__FILE__ ~title:"set deposits limit" ~tags:["deposits_limit"] + ~supports:Protocol.(Until_protocol (number Nairobi)) @@ fun protocol -> let* _, client = Client.init_with_protocol ~protocol `Client () in let src = Constant.bootstrap1.alias in @@ -46,6 +47,7 @@ let test_unset_deposits_limit = ~__FILE__ ~title:"unset deposits limit" ~tags:["deposits_limit"] + ~supports:Protocol.(Until_protocol (number Nairobi)) @@ fun protocol -> let* _, client = Client.init_with_protocol ~protocol `Client () in let src = Constant.bootstrap1.alias in diff --git a/tezt/tests/expected/deposits_limit.ml/Alpha- set deposits limit.out b/tezt/tests/expected/deposits_limit.ml/Alpha- set deposits limit.out deleted file mode 100644 index 8ac64a759156d64f8e6245177a1ac64667dede16..0000000000000000000000000000000000000000 --- a/tezt/tests/expected/deposits_limit.ml/Alpha- set deposits limit.out +++ /dev/null @@ -1,26 +0,0 @@ -Node is bootstrapped. -Estimated gas: 168.052 units (will add 0 for safety) -Estimated storage: no bytes added -Operation successfully injected in the node. -Operation hash is 'oogPg9fm3Wo8Fub69ehKvyhmefv442MSvvKME7awo3zvZVAsuTo' -NOT waiting for the operation to be included. -Use command - octez-client wait for oogPg9fm3Wo8Fub69ehKvyhmefv442MSvvKME7awo3zvZVAsuTo to be included --confirmations 1 --branch BLockGenesisGenesisGenesisGenesisGenesisf79b5d1CoW2 -and/or an external block explorer to make sure that it has been included. -This sequence of operations was run: - Manager signed operations: - From: tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx - Fee to the baker: ꜩ0.000247 - Expected counter: 1 - Gas limit: 169 - Storage limit: 0 bytes - Balance updates: - tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx ... -ꜩ0.000247 - payload fees(the block proposer) ....... +ꜩ0.000247 - Set deposits limit: - Delegate: tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx - Limit: 1000 - This deposits limit modification was successfully applied - Consumed gas: 167.986 - - diff --git a/tezt/tests/expected/deposits_limit.ml/Alpha- unset deposits limit.out b/tezt/tests/expected/deposits_limit.ml/Alpha- unset deposits limit.out deleted file mode 100644 index fc4436f54195c0977d349be25721b7af5f50b9ec..0000000000000000000000000000000000000000 --- a/tezt/tests/expected/deposits_limit.ml/Alpha- unset deposits limit.out +++ /dev/null @@ -1,26 +0,0 @@ -Node is bootstrapped. -Estimated gas: 167.886 units (will add 0 for safety) -Estimated storage: no bytes added -Operation successfully injected in the node. -Operation hash is 'oo1PJ41t8u2VYdoeFVgREH9LKKtASE141H3wWRmKRbuBcshW3hR' -NOT waiting for the operation to be included. -Use command - octez-client wait for oo1PJ41t8u2VYdoeFVgREH9LKKtASE141H3wWRmKRbuBcshW3hR to be included --confirmations 1 --branch BLockGenesisGenesisGenesisGenesisGenesisf79b5d1CoW2 -and/or an external block explorer to make sure that it has been included. -This sequence of operations was run: - Manager signed operations: - From: tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx - Fee to the baker: ꜩ0.000242 - Expected counter: 1 - Gas limit: 168 - Storage limit: 0 bytes - Balance updates: - tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx ... -ꜩ0.000242 - payload fees(the block proposer) ....... +ꜩ0.000242 - Set deposits limit: - Delegate: tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx - Unlimited deposits - This deposits limit modification was successfully applied - Consumed gas: 167.820 - -