diff --git a/devtools/get_contracts/get_contracts_alpha.ml b/devtools/get_contracts/get_contracts_alpha.ml index 7f1d4ba9249f168751549610ca963255b1295edc..b0f3cef9ac9cf569514b43ca0618532400e0881a 100644 --- a/devtools/get_contracts/get_contracts_alpha.ml +++ b/devtools/get_contracts/get_contracts_alpha.ml @@ -38,7 +38,12 @@ module Proto = struct let open Lwt_result_syntax in let+ ctxt = Lwt.map wrap_tzresult - @@ Raw_context.prepare ~level ~predecessor_timestamp ~timestamp ctxt + @@ Raw_context.prepare + ~level + ~predecessor_timestamp + ~timestamp + ~adaptive_inflation_enable:false + ctxt in Raw_context.set_gas_limit ctxt diff --git a/src/proto_alpha/lib_delegate/test/tenderbrute/lib/tenderbrute.ml b/src/proto_alpha/lib_delegate/test/tenderbrute/lib/tenderbrute.ml index ce3f8bba638032e0e0d5ca935d40cf774956ea05..51e03c88c9ff8e40b1f4127389873244fa57b132 100644 --- a/src/proto_alpha/lib_delegate/test/tenderbrute/lib/tenderbrute.ml +++ b/src/proto_alpha/lib_delegate/test/tenderbrute/lib/tenderbrute.ml @@ -56,7 +56,12 @@ let init_context ?constants_overrides_json ?bootstrap_accounts_json parameters = let ctxt = mockup_init.rpc_context.context in let timestamp = Time.Protocol.of_seconds 0L in (* The timestamp is irrelevant for the rights *) - Raw_context.prepare ctxt ~level:1l ~predecessor_timestamp:timestamp ~timestamp + Raw_context.prepare + ctxt + ~level:1l + ~predecessor_timestamp:timestamp + ~timestamp + ~adaptive_inflation_enable:false >|= Environment.wrap_tzresult (* Change the initial seed for the first preserved cycles. This suppose that the diff --git a/src/proto_alpha/lib_parameters/default_parameters.ml b/src/proto_alpha/lib_parameters/default_parameters.ml index 8e98489a479fd35cf6f4ad297ccc862e9764f61c..dc1737fae8949cb2c1f456f9e91b64eda5246aa8 100644 --- a/src/proto_alpha/lib_parameters/default_parameters.ml +++ b/src/proto_alpha/lib_parameters/default_parameters.ml @@ -289,7 +289,6 @@ let constants_mainnet = }; adaptive_inflation = { - enable = false; staking_over_baking_limit = 5; max_costaking_baker_count = 5; staking_over_delegation_edge = 2; diff --git a/src/proto_alpha/lib_protocol/adaptive_inflation_storage.ml b/src/proto_alpha/lib_protocol/adaptive_inflation_storage.ml index eb2136ddd122abba5a7ceaaad635aab5af89b5ba..e29d402c7358e991f871ed3fedd9097863ed8844 100644 --- a/src/proto_alpha/lib_protocol/adaptive_inflation_storage.ml +++ b/src/proto_alpha/lib_protocol/adaptive_inflation_storage.ml @@ -44,7 +44,7 @@ let max_bonus = Int64.div bonus_unit 20L (* = 5% *) let get_reward_coeff ctxt ~cycle = let open Lwt_result_syntax in - let ai_enable = (Raw_context.constants ctxt).adaptive_inflation.enable in + let ai_enable = Constants_storage.adaptive_inflation_enable ctxt in if ai_enable then (* Even if AI is enabled, the storage can be empty: this is the case for the first 5 cycles after AI is enabled *) @@ -57,7 +57,7 @@ let get_reward_bonus ctxt ~cycle = match cycle with | None -> return default_bonus | Some cycle -> - let ai_enable = (Raw_context.constants ctxt).adaptive_inflation.enable in + let ai_enable = Constants_storage.adaptive_inflation_enable ctxt in if ai_enable then let* k_opt = Storage.Reward_bonus.find ctxt cycle in return (Option.value ~default:default_bonus k_opt) @@ -146,7 +146,7 @@ let compute_coeff = let compute_and_store_reward_coeff_at_cycle_end ctxt ~new_cycle = let open Lwt_result_syntax in - let ai_enable = (Raw_context.constants ctxt).adaptive_inflation.enable in + let ai_enable = Constants_storage.adaptive_inflation_enable ctxt in if not ai_enable then return ctxt else let preserved = Constants_storage.preserved_cycles ctxt in @@ -211,6 +211,18 @@ let activate ctxt ~cycle = let launch_cycle ctxt = Storage.Adaptive_inflation.Activation.get ctxt +let set_adaptive_inflation_enable ctxt = + let open Lwt_result_syntax in + let+ enable = + let+ launch_cycle = launch_cycle ctxt in + match launch_cycle with + | None -> false + | Some launch_cycle -> + let current_cycle = (Level_storage.current ctxt).cycle in + Cycle_repr.(current_cycle >= launch_cycle) + in + if enable then Raw_context.set_adaptive_inflation_enable ctxt else ctxt + let update_ema ctxt ~vote = Storage.Adaptive_inflation.Launch_ema.get ctxt >>=? fun old_ema -> Toggle_votes_repr.Adaptive_inflation_launch_EMA.of_int32 old_ema diff --git a/src/proto_alpha/lib_protocol/adaptive_inflation_storage.mli b/src/proto_alpha/lib_protocol/adaptive_inflation_storage.mli index e539faef9fc9a812843755de28a48a57dbfc713a..6702480230a53e03097d89fda6c7ce0d115b94c8 100644 --- a/src/proto_alpha/lib_protocol/adaptive_inflation_storage.mli +++ b/src/proto_alpha/lib_protocol/adaptive_inflation_storage.mli @@ -23,6 +23,14 @@ (* *) (*****************************************************************************) +(** [set_adaptive_inflation_enable ctxt] sets the feature flag in the + in-memory part of the context if the adaptive inflation feature has + already launched. This means that the activation vote resulted in + an approbation from the stakeholders and this happened sufficiently + long ago. *) +val set_adaptive_inflation_enable : + Raw_context.t -> Raw_context.t tzresult Lwt.t + (** [load_reward_coeff ctxt] loads the current cycle's reward coeff from the storage into the context *) val load_reward_coeff : Raw_context.t -> Raw_context.t tzresult Lwt.t diff --git a/src/proto_alpha/lib_protocol/alpha_context.mli b/src/proto_alpha/lib_protocol/alpha_context.mli index 7e4db329f6ce4b525bb681efd3bb8e93317d974b..29fb401c72f347d0f4c90916b17af73d08d41e2f 100644 --- a/src/proto_alpha/lib_protocol/alpha_context.mli +++ b/src/proto_alpha/lib_protocol/alpha_context.mli @@ -843,7 +843,6 @@ module Constants : sig } type adaptive_inflation = { - enable : bool; staking_over_baking_limit : int; max_costaking_baker_count : int; staking_over_delegation_edge : int; diff --git a/src/proto_alpha/lib_protocol/constants_parametric_repr.ml b/src/proto_alpha/lib_protocol/constants_parametric_repr.ml index d7937893a040842688e80ead53529f1144320488..2c2ee52d97872e97a63b3049889115dbac84ec0a 100644 --- a/src/proto_alpha/lib_protocol/constants_parametric_repr.ml +++ b/src/proto_alpha/lib_protocol/constants_parametric_repr.ml @@ -124,7 +124,6 @@ type zk_rollup = { } type adaptive_inflation = { - enable : bool; staking_over_baking_limit : int; max_costaking_baker_count : int; staking_over_delegation_edge : int; @@ -341,31 +340,26 @@ let adaptive_inflation_encoding = let open Data_encoding in conv (fun { - enable; staking_over_baking_limit; max_costaking_baker_count; staking_over_delegation_edge; launch_ema_threshold; } -> - ( enable, - staking_over_baking_limit, + ( staking_over_baking_limit, max_costaking_baker_count, staking_over_delegation_edge, launch_ema_threshold )) - (fun ( adaptive_inflation_enable, - staking_over_baking_limit, + (fun ( staking_over_baking_limit, max_costaking_baker_count, staking_over_delegation_edge, launch_ema_threshold ) -> { - enable = adaptive_inflation_enable; staking_over_baking_limit; max_costaking_baker_count; staking_over_delegation_edge; launch_ema_threshold; }) - (obj5 - (req "adaptive_inflation_enable" bool) + (obj4 (req "staking_over_baking_limit" uint8) (req "max_costaking_baker_count" uint16) (req "staking_over_delegation_edge" uint8) diff --git a/src/proto_alpha/lib_protocol/constants_parametric_repr.mli b/src/proto_alpha/lib_protocol/constants_parametric_repr.mli index be72e6331394621f44e444fd11016a1d2c01addf..63af6bae3a800272be1a3779dc5b486c80b7f459 100644 --- a/src/proto_alpha/lib_protocol/constants_parametric_repr.mli +++ b/src/proto_alpha/lib_protocol/constants_parametric_repr.mli @@ -139,7 +139,6 @@ type zk_rollup = { } type adaptive_inflation = { - enable : bool; staking_over_baking_limit (* Global maximum costake tokens taken into account per baking token. Each baker can set their own lower limit. *) : int; diff --git a/src/proto_alpha/lib_protocol/constants_storage.ml b/src/proto_alpha/lib_protocol/constants_storage.ml index 87df7d47928eff0471480bfb1d0293080e3dabbd..b5d82b3fe42624a22851315468aa2fa0309f32a4 100644 --- a/src/proto_alpha/lib_protocol/constants_storage.ml +++ b/src/proto_alpha/lib_protocol/constants_storage.ml @@ -280,7 +280,7 @@ let zk_rollup_origination_size c = let adaptive_inflation c = (Raw_context.constants c).adaptive_inflation -let adaptive_inflation_enable c = (adaptive_inflation c).enable +let adaptive_inflation_enable c = Raw_context.adaptive_inflation_enable c let adaptive_inflation_staking_over_baking_limit c = (adaptive_inflation c).staking_over_baking_limit diff --git a/src/proto_alpha/lib_protocol/init_storage.ml b/src/proto_alpha/lib_protocol/init_storage.ml index d04930f018e0aa28a2b9dae1571ce7473f3b5e18..5f0b787b067addd776930c6a9422334212a646c5 100644 --- a/src/proto_alpha/lib_protocol/init_storage.ml +++ b/src/proto_alpha/lib_protocol/init_storage.ml @@ -255,5 +255,12 @@ let prepare_first_block _chain_id ctxt ~typecheck_smart_contract >>= fun ctxt -> return ctxt let prepare ctxt ~level ~predecessor_timestamp ~timestamp = - Raw_context.prepare ~level ~predecessor_timestamp ~timestamp ctxt - >>=? fun ctxt -> Storage.Pending_migration.remove ctxt + Raw_context.prepare + ~level + ~predecessor_timestamp + ~timestamp + ~adaptive_inflation_enable:false + ctxt + >>=? fun ctxt -> + Adaptive_inflation_storage.set_adaptive_inflation_enable ctxt >>=? fun ctxt -> + Storage.Pending_migration.remove ctxt diff --git a/src/proto_alpha/lib_protocol/raw_context.ml b/src/proto_alpha/lib_protocol/raw_context.ml index 780a7e378ce1fa39c83d41ddcc83083555ac3ebf..3d89ef868eee125be5fe66e16954b5ef5edd14d2 100644 --- a/src/proto_alpha/lib_protocol/raw_context.ml +++ b/src/proto_alpha/lib_protocol/raw_context.ml @@ -269,6 +269,7 @@ type back = { dummy slot headers. *) dal_attestation_slot_accountability : Dal_attestation_repr.Accountability.t; dal_committee : dal_committee; + adaptive_inflation_enable : bool; } (* @@ -340,6 +341,9 @@ let[@inline] sampler_state ctxt = ctxt.back.sampler_state let[@inline] reward_coeff_for_current_cycle ctxt = ctxt.back.reward_coeff_for_current_cycle +let[@inline] adaptive_inflation_enable ctxt = + ctxt.back.adaptive_inflation_enable + let[@inline] update_back ctxt back = {ctxt with back} let[@inline] update_remaining_block_gas ctxt remaining_block_gas = @@ -385,6 +389,9 @@ let[@inline] update_reward_coeff_for_current_cycle ctxt reward_coeff_for_current_cycle = update_back ctxt {ctxt.back with reward_coeff_for_current_cycle} +let[@inline] set_adaptive_inflation_enable ctxt = + update_back ctxt {ctxt.back with adaptive_inflation_enable = true} + type error += Too_many_internal_operations (* `Permanent *) type error += Block_quota_exceeded (* `Temporary *) @@ -804,7 +811,8 @@ let check_cycle_eras (cycle_eras : Level_repr.cycle_eras) Compare.Int32.( current_era.blocks_per_commitment = constants.blocks_per_commitment)) -let prepare ~level ~predecessor_timestamp ~timestamp ctxt = +let prepare ~level ~predecessor_timestamp ~timestamp ~adaptive_inflation_enable + ctxt = Raw_level_repr.of_int32 level >>?= fun level -> check_inited ctxt >>=? fun () -> get_constants ctxt >>=? fun constants -> @@ -852,6 +860,7 @@ let prepare ~level ~predecessor_timestamp ~timestamp ctxt = Dal_attestation_repr.Accountability.init ~length:constants.Constants_parametric_repr.dal.number_of_slots; dal_committee = empty_dal_committee; + adaptive_inflation_enable; }; } @@ -995,7 +1004,6 @@ let prepare_first_block ~level ~timestamp ctxt = let adaptive_inflation = Constants_parametric_repr. { - enable = false; staking_over_baking_limit = 5; max_costaking_baker_count = 5; staking_over_delegation_edge = 2; @@ -1080,7 +1088,12 @@ let prepare_first_block ~level ~timestamp ctxt = in add_constants ctxt constants >>= fun ctxt -> return ctxt) >>=? fun ctxt -> - prepare ctxt ~level ~predecessor_timestamp:timestamp ~timestamp + prepare + ctxt + ~level + ~predecessor_timestamp:timestamp + ~timestamp + ~adaptive_inflation_enable:false >|=? fun ctxt -> (previous_proto, ctxt) let activate ctxt h = Updater.activate (context ctxt) h >|= update_context ctxt diff --git a/src/proto_alpha/lib_protocol/raw_context.mli b/src/proto_alpha/lib_protocol/raw_context.mli index 579c0ba61ea912d02b79e4f84e855fe61860b3fb..7dc75aea6cf734ea609a61928b0902869d825c9c 100644 --- a/src/proto_alpha/lib_protocol/raw_context.mli +++ b/src/proto_alpha/lib_protocol/raw_context.mli @@ -89,6 +89,7 @@ val prepare : level:Int32.t -> predecessor_timestamp:Time.t -> timestamp:Time.t -> + adaptive_inflation_enable:bool -> Context.t -> t tzresult Lwt.t @@ -297,6 +298,12 @@ val reward_coeff_for_current_cycle : t -> Q.t [Adaptive_inflation_storage] *) val update_reward_coeff_for_current_cycle : t -> Q.t -> t +(** Returns true if adaptive inflation has launched. *) +val adaptive_inflation_enable : t -> bool + +(** Set the feature flag of adaptive inflation. *) +val set_adaptive_inflation_enable : t -> t + module Internal_for_tests : sig val add_level : t -> int -> t diff --git a/src/proto_alpha/lib_protocol/test/helpers/block.ml b/src/proto_alpha/lib_protocol/test/helpers/block.ml index bce05cb0aad0f95dda7fe3b108d9521c5ff339e5..d2097b98f182869ee0c35ff7f2258d1615455844 100644 --- a/src/proto_alpha/lib_protocol/test/helpers/block.ml +++ b/src/proto_alpha/lib_protocol/test/helpers/block.ml @@ -499,8 +499,8 @@ let validate_bootstrap_accounts let prepare_initial_context_params ?consensus_threshold ?min_proposal_quorum ?level ?cost_per_byte ?reward_weights ?origination_size ?blocks_per_cycle ?cycles_per_voting_period ?sc_rollup_enable ?sc_rollup_arith_pvm_enable - ?dal_enable ?zk_rollup_enable ?adaptive_inflation_enable - ?hard_gas_limit_per_block ?nonce_revelation_threshold () = + ?dal_enable ?zk_rollup_enable ?hard_gas_limit_per_block + ?nonce_revelation_threshold () = let open Tezos_protocol_alpha_parameters in let constants = Default_parameters.constants_test in let min_proposal_quorum = @@ -538,11 +538,6 @@ let prepare_initial_context_params ?consensus_threshold ?min_proposal_quorum let zk_rollup_enable = Option.value ~default:constants.zk_rollup.enable zk_rollup_enable in - let adaptive_inflation_enable = - Option.value - ~default:constants.adaptive_inflation.enable - adaptive_inflation_enable - in let hard_gas_limit_per_block = Option.value ~default:constants.hard_gas_limit_per_block @@ -572,8 +567,7 @@ let prepare_initial_context_params ?consensus_threshold ?min_proposal_quorum }; dal = {constants.dal with feature_enable = dal_enable}; zk_rollup = {constants.zk_rollup with enable = zk_rollup_enable}; - adaptive_inflation = - {constants.adaptive_inflation with enable = adaptive_inflation_enable}; + adaptive_inflation = constants.adaptive_inflation; hard_gas_limit_per_block; nonce_revelation_threshold; } @@ -607,8 +601,7 @@ let genesis ?commitments ?consensus_threshold ?min_proposal_quorum ?bootstrap_contracts ?level ?cost_per_byte ?reward_weights ?origination_size ?blocks_per_cycle ?cycles_per_voting_period ?sc_rollup_enable ?sc_rollup_arith_pvm_enable ?dal_enable ?zk_rollup_enable - ?hard_gas_limit_per_block ?adaptive_inflation_enable - ?nonce_revelation_threshold + ?hard_gas_limit_per_block ?nonce_revelation_threshold (bootstrap_accounts : Parameters.bootstrap_account list) = prepare_initial_context_params ?consensus_threshold @@ -624,7 +617,6 @@ let genesis ?commitments ?consensus_threshold ?min_proposal_quorum ?dal_enable ?zk_rollup_enable ?hard_gas_limit_per_block - ?adaptive_inflation_enable ?nonce_revelation_threshold () >>=? fun (constants, shell, hash) -> diff --git a/src/proto_alpha/lib_protocol/test/helpers/block.mli b/src/proto_alpha/lib_protocol/test/helpers/block.mli index 312845c83e81c2364a612451a712ac2b94e396a2..672d749abda3d5f139428b2f6df4a58f7902915c 100644 --- a/src/proto_alpha/lib_protocol/test/helpers/block.mli +++ b/src/proto_alpha/lib_protocol/test/helpers/block.mli @@ -137,7 +137,6 @@ val genesis : ?dal_enable:bool -> ?zk_rollup_enable:bool -> ?hard_gas_limit_per_block:Gas.Arith.integral -> - ?adaptive_inflation_enable:bool -> ?nonce_revelation_threshold:int32 -> Parameters.bootstrap_account list -> block tzresult Lwt.t @@ -299,7 +298,6 @@ val prepare_initial_context_params : ?sc_rollup_arith_pvm_enable:bool -> ?dal_enable:bool -> ?zk_rollup_enable:bool -> - ?adaptive_inflation_enable:bool -> ?hard_gas_limit_per_block:Gas.Arith.integral -> ?nonce_revelation_threshold:int32 -> unit -> diff --git a/src/proto_alpha/lib_protocol/test/helpers/context.ml b/src/proto_alpha/lib_protocol/test/helpers/context.ml index 229bdbbbdd3bd084a386544fae82e564afd3e749..efa5c710e73d520f072910647261caf09e9f1696 100644 --- a/src/proto_alpha/lib_protocol/test/helpers/context.ml +++ b/src/proto_alpha/lib_protocol/test/helpers/context.ml @@ -483,8 +483,8 @@ let init_gen tup ?rng_state ?commitments ?bootstrap_balances ?min_proposal_quorum ?bootstrap_contracts ?level ?cost_per_byte ?reward_weights ?origination_size ?blocks_per_cycle ?cycles_per_voting_period ?sc_rollup_enable ?sc_rollup_arith_pvm_enable - ?dal_enable ?zk_rollup_enable ?adaptive_inflation_enable - ?hard_gas_limit_per_block ?nonce_revelation_threshold () = + ?dal_enable ?zk_rollup_enable ?hard_gas_limit_per_block + ?nonce_revelation_threshold () = let n = tup_n tup in Account.generate_accounts ?rng_state n >>?= fun accounts -> let contracts = @@ -513,7 +513,6 @@ let init_gen tup ?rng_state ?commitments ?bootstrap_balances ?dal_enable ?zk_rollup_enable ?hard_gas_limit_per_block - ?adaptive_inflation_enable ?nonce_revelation_threshold bootstrap_accounts >|=? fun blk -> (blk, tup_get tup contracts) diff --git a/src/proto_alpha/lib_protocol/test/helpers/context.mli b/src/proto_alpha/lib_protocol/test/helpers/context.mli index 9a718bc9e497aadaece20c7d97abf01f87b70ac2..76ae1c576b64129ab44e10c256ce78b9d841f436 100644 --- a/src/proto_alpha/lib_protocol/test/helpers/context.mli +++ b/src/proto_alpha/lib_protocol/test/helpers/context.mli @@ -278,7 +278,6 @@ type 'accounts init := ?sc_rollup_arith_pvm_enable:bool -> ?dal_enable:bool -> ?zk_rollup_enable:bool -> - ?adaptive_inflation_enable:bool -> ?hard_gas_limit_per_block:Gas.Arith.integral -> ?nonce_revelation_threshold:int32 -> unit -> diff --git a/src/proto_alpha/lib_protocol/test/integration/consensus/test_deactivation.ml b/src/proto_alpha/lib_protocol/test/integration/consensus/test_deactivation.ml index 387d8337413ffa593556f883dd76ab942b8fe2fe..c31d5d742dda32c3722272cca2d823f74f67496a 100644 --- a/src/proto_alpha/lib_protocol/test/integration/consensus/test_deactivation.ml +++ b/src/proto_alpha/lib_protocol/test/integration/consensus/test_deactivation.ml @@ -54,6 +54,7 @@ let check_stake ~loc (b : Block.t) (account : Account.t) = ~level:b.header.shell.level ~predecessor_timestamp:b.header.shell.timestamp ~timestamp:b.header.shell.timestamp + ~adaptive_inflation_enable:false >>= wrap >>=? fun ctxt -> Stake_storage.get ctxt account.pkh >>= wrap >>=? fun stake -> @@ -74,6 +75,7 @@ let check_no_stake ~loc (b : Block.t) (account : Account.t) = ~level:b.header.shell.level ~predecessor_timestamp:b.header.shell.timestamp ~timestamp:b.header.shell.timestamp + ~adaptive_inflation_enable:false >>= wrap >>=? fun ctxt -> Stake_storage.get ctxt account.pkh >>= wrap >>=? fun stake -> diff --git a/src/proto_alpha/lib_protocol/test/integration/gas/test_gas_levels.ml b/src/proto_alpha/lib_protocol/test/integration/gas/test_gas_levels.ml index 8127a9f0ec878e1d451d53407af48dd8747bf269..7732e31ee87faad542f5b8d91a010a82577cb159 100644 --- a/src/proto_alpha/lib_protocol/test/integration/gas/test_gas_levels.ml +++ b/src/proto_alpha/lib_protocol/test/integration/gas/test_gas_levels.ml @@ -55,6 +55,7 @@ let dummy_context () = ~timestamp:Time.Protocol.epoch (* ~fitness:[] *) (block.context : Tezos_protocol_environment.Context.t) + ~adaptive_inflation_enable:false >|= Environment.wrap_tzresult let consume_gas_lwt context gas = diff --git a/src/proto_alpha/lib_protocol/test/integration/michelson/test_sapling.ml b/src/proto_alpha/lib_protocol/test/integration/michelson/test_sapling.ml index a5c6a9e1b706431f4c151dad1788a989f3e3c8e9..38b65f63deffc0714a878f9faab9fe72d06972b2 100644 --- a/src/proto_alpha/lib_protocol/test/integration/michelson/test_sapling.ml +++ b/src/proto_alpha/lib_protocol/test/integration/michelson/test_sapling.ml @@ -53,6 +53,7 @@ module Raw_context_tests = struct ~level:b.header.shell.level ~predecessor_timestamp:b.header.shell.timestamp ~timestamp:b.header.shell.timestamp + ~adaptive_inflation_enable:false >>= wrap >>=? fun ctx -> let module H = Tezos_sapling.Core.Client.Hash in @@ -92,6 +93,7 @@ module Raw_context_tests = struct ~level:b.header.shell.level ~predecessor_timestamp:b.header.shell.timestamp ~timestamp:b.header.shell.timestamp + ~adaptive_inflation_enable:false >>= wrap >>=? fun ctx -> Lazy_storage_diff.fresh Lazy_storage_kind.Sapling_state ~temporary:false ctx @@ -121,6 +123,7 @@ module Raw_context_tests = struct ~level:b.header.shell.level ~predecessor_timestamp:b.header.shell.timestamp ~timestamp:b.header.shell.timestamp + ~adaptive_inflation_enable:false >>= wrap >>=? fun ctx -> Lazy_storage_diff.fresh Lazy_storage_kind.Sapling_state ~temporary:false ctx @@ -176,6 +179,7 @@ module Raw_context_tests = struct ~level:b.header.shell.level ~predecessor_timestamp:b.header.shell.timestamp ~timestamp:b.header.shell.timestamp + ~adaptive_inflation_enable:false >>= wrap >>=? fun ctx -> Lazy_storage_diff.fresh Lazy_storage_kind.Sapling_state ~temporary:false ctx @@ -218,6 +222,7 @@ module Raw_context_tests = struct ~level:b.header.shell.level ~predecessor_timestamp:b.header.shell.timestamp ~timestamp:b.header.shell.timestamp + ~adaptive_inflation_enable:false >>= wrap >>=? fun ctx -> Lazy_storage_diff.fresh Lazy_storage_kind.Sapling_state ~temporary:false ctx @@ -293,6 +298,7 @@ module Raw_context_tests = struct ~level:b.header.shell.level ~predecessor_timestamp:b.header.shell.timestamp ~timestamp:b.header.shell.timestamp + ~adaptive_inflation_enable:false >>= wrap >>=? fun ctx -> Lazy_storage_diff.fresh Lazy_storage_kind.Sapling_state ~temporary:false ctx @@ -310,6 +316,7 @@ module Raw_context_tests = struct ~predecessor_timestamp:b.header.shell.timestamp ~timestamp:b.header.shell.timestamp (Raw_context.recover ctx) + ~adaptive_inflation_enable:false >>= wrap >|=? fun ctx -> (ctx, Int32.succ cnt)) (ctx, 0l) @@ -353,6 +360,7 @@ module Raw_context_tests = struct ~level:b.header.shell.level ~predecessor_timestamp:b.header.shell.timestamp ~timestamp:b.header.shell.timestamp + ~adaptive_inflation_enable:false >>= wrap >>=? fun ctx -> Lazy_storage_diff.fresh Lazy_storage_kind.Sapling_state ~temporary:false ctx @@ -987,6 +995,7 @@ module Interpreter_tests = struct ~level:block.header.shell.level ~predecessor_timestamp:block.header.shell.timestamp ~timestamp:block.header.shell.timestamp + ~adaptive_inflation_enable:false >>= wrap >>=? fun raw_ctx -> Sapling_storage.Roots.mem raw_ctx id root >>= wrap in diff --git a/src/proto_alpha/lib_protocol/test/integration/michelson/test_temp_big_maps.ml b/src/proto_alpha/lib_protocol/test/integration/michelson/test_temp_big_maps.ml index 4206b836b05fb8fceaafd5b7e37cab0b4c5066ea..50148401f46d58b972e8b9eb37dcb31dd960b1c7 100644 --- a/src/proto_alpha/lib_protocol/test/integration/michelson/test_temp_big_maps.ml +++ b/src/proto_alpha/lib_protocol/test/integration/michelson/test_temp_big_maps.ml @@ -39,6 +39,7 @@ let to_raw_context (b : Block.t) = ~level:b.header.shell.level ~predecessor_timestamp:b.header.shell.timestamp ~timestamp:b.header.shell.timestamp + ~adaptive_inflation_enable:false >|= Environment.wrap_tzresult let check_no_dangling_temp_big_map b = diff --git a/src/proto_alpha/lib_protocol/test/unit/test_zk_rollup_storage.ml b/src/proto_alpha/lib_protocol/test/unit/test_zk_rollup_storage.ml index 82af6fbe1f0be6a7b26daa41231950465f94d3f2..703a5a7bb6a568e5190fcaa3651cbeb45b568612 100644 --- a/src/proto_alpha/lib_protocol/test/unit/test_zk_rollup_storage.ml +++ b/src/proto_alpha/lib_protocol/test/unit/test_zk_rollup_storage.ml @@ -102,6 +102,7 @@ module Raw_context_tests = struct ~level:b.header.shell.level ~predecessor_timestamp:b.header.shell.timestamp ~timestamp:b.header.shell.timestamp + ~adaptive_inflation_enable:false in let nonce = Operation_hash.hash_string ["nonce_hash"] in return (Raw_context.init_origination_nonce ctx nonce, contract) diff --git a/tezt/tests/expected/RPC_test.ml/Alpha- (mode client) RPC regression tests- misc_protocol.out b/tezt/tests/expected/RPC_test.ml/Alpha- (mode client) RPC regression tests- misc_protocol.out index 2b049572078fce137d286aa3362ac2010ebcbace..a24db32d7100aa83958302da0297c34feb523a1c 100644 --- a/tezt/tests/expected/RPC_test.ml/Alpha- (mode client) RPC regression tests- misc_protocol.out +++ b/tezt/tests/expected/RPC_test.ml/Alpha- (mode client) RPC regression tests- misc_protocol.out @@ -65,8 +65,8 @@ "smart_rollup_max_number_of_cemented_commitments": 5, "smart_rollup_max_number_of_parallel_games": 32, "zk_rollup_enable": false, "zk_rollup_origination_size": 4000, "zk_rollup_min_pending_to_process": 10, - "adaptive_inflation_enable": false, "staking_over_baking_limit": 5, - "max_costaking_baker_count": 5, "staking_over_delegation_edge": 2, + "staking_over_baking_limit": 5, "max_costaking_baker_count": 5, + "staking_over_delegation_edge": 2, "adaptive_inflation_launch_ema_threshold": 1600000000 } ./octez-client rpc get /chains/main/blocks/head/helpers/baking_rights diff --git a/tezt/tests/expected/RPC_test.ml/Alpha- (mode light) RPC regression tests- misc_protocol.out b/tezt/tests/expected/RPC_test.ml/Alpha- (mode light) RPC regression tests- misc_protocol.out index 777c90d878b45989b91820eb30b53e4bea86dd53..4b85fcda0040c0cbc2dfd48b8b71bc1b404c17ee 100644 --- a/tezt/tests/expected/RPC_test.ml/Alpha- (mode light) RPC regression tests- misc_protocol.out +++ b/tezt/tests/expected/RPC_test.ml/Alpha- (mode light) RPC regression tests- misc_protocol.out @@ -65,8 +65,8 @@ "smart_rollup_max_number_of_cemented_commitments": 5, "smart_rollup_max_number_of_parallel_games": 32, "zk_rollup_enable": false, "zk_rollup_origination_size": 4000, "zk_rollup_min_pending_to_process": 10, - "adaptive_inflation_enable": false, "staking_over_baking_limit": 5, - "max_costaking_baker_count": 5, "staking_over_delegation_edge": 2, + "staking_over_baking_limit": 5, "max_costaking_baker_count": 5, + "staking_over_delegation_edge": 2, "adaptive_inflation_launch_ema_threshold": 1600000000 } ./octez-client --mode light rpc get /chains/main/blocks/head/helpers/baking_rights diff --git a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy) RPC regression tests- misc_protocol.out b/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy) RPC regression tests- misc_protocol.out index 74efc36dd422ee68b8f822bbaca9e86da54f4cff..701e5c5ed9756df1caa38593b10aff7466d60c0b 100644 --- a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy) RPC regression tests- misc_protocol.out +++ b/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy) RPC regression tests- misc_protocol.out @@ -65,8 +65,8 @@ "smart_rollup_max_number_of_cemented_commitments": 5, "smart_rollup_max_number_of_parallel_games": 32, "zk_rollup_enable": false, "zk_rollup_origination_size": 4000, "zk_rollup_min_pending_to_process": 10, - "adaptive_inflation_enable": false, "staking_over_baking_limit": 5, - "max_costaking_baker_count": 5, "staking_over_delegation_edge": 2, + "staking_over_baking_limit": 5, "max_costaking_baker_count": 5, + "staking_over_delegation_edge": 2, "adaptive_inflation_launch_ema_threshold": 1600000000 } ./octez-client --mode proxy rpc get /chains/main/blocks/head/helpers/baking_rights diff --git a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_data_dir) RPC regression tests- misc_protocol.out b/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_data_dir) RPC regression tests- misc_protocol.out index dc485a1d4b3a3db51d8af23449e3d133926e23c4..1ff700fdd51f301dba35ced66854673121bee3c4 100644 --- a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_data_dir) RPC regression tests- misc_protocol.out +++ b/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_data_dir) RPC regression tests- misc_protocol.out @@ -65,8 +65,8 @@ "smart_rollup_max_number_of_cemented_commitments": 5, "smart_rollup_max_number_of_parallel_games": 32, "zk_rollup_enable": false, "zk_rollup_origination_size": 4000, "zk_rollup_min_pending_to_process": 10, - "adaptive_inflation_enable": false, "staking_over_baking_limit": 5, - "max_costaking_baker_count": 5, "staking_over_delegation_edge": 2, + "staking_over_baking_limit": 5, "max_costaking_baker_count": 5, + "staking_over_delegation_edge": 2, "adaptive_inflation_launch_ema_threshold": 1600000000 } ./octez-client rpc get /chains/main/blocks/head/helpers/baking_rights diff --git a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_rpc) RPC regression tests- misc_protocol.out b/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_rpc) RPC regression tests- misc_protocol.out index dc485a1d4b3a3db51d8af23449e3d133926e23c4..1ff700fdd51f301dba35ced66854673121bee3c4 100644 --- a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_rpc) RPC regression tests- misc_protocol.out +++ b/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_rpc) RPC regression tests- misc_protocol.out @@ -65,8 +65,8 @@ "smart_rollup_max_number_of_cemented_commitments": 5, "smart_rollup_max_number_of_parallel_games": 32, "zk_rollup_enable": false, "zk_rollup_origination_size": 4000, "zk_rollup_min_pending_to_process": 10, - "adaptive_inflation_enable": false, "staking_over_baking_limit": 5, - "max_costaking_baker_count": 5, "staking_over_delegation_edge": 2, + "staking_over_baking_limit": 5, "max_costaking_baker_count": 5, + "staking_over_delegation_edge": 2, "adaptive_inflation_launch_ema_threshold": 1600000000 } ./octez-client rpc get /chains/main/blocks/head/helpers/baking_rights