diff --git a/src/proto_alpha/lib_parameters/default_parameters.ml b/src/proto_alpha/lib_parameters/default_parameters.ml index 84221c87ba73287bbf484d5bda5fa01a8bb00c93..e150514d3f4d9aeccf6a08575817ac9d1f11d906 100644 --- a/src/proto_alpha/lib_parameters/default_parameters.ml +++ b/src/proto_alpha/lib_parameters/default_parameters.ml @@ -285,7 +285,7 @@ let constants_mainnet : Constants.Parametric.t = { global_limit_of_staking_over_baking = 5; edge_of_staking_over_delegation = 2; - launch_ema_threshold = 1_600_000_000l; + launch_ema_threshold = 0l; adaptive_rewards_params = { issuance_ratio_final_min = Q.(0_25 // 100_00); diff --git a/src/proto_alpha/lib_protocol/raw_context.ml b/src/proto_alpha/lib_protocol/raw_context.ml index 9ccc46907926b0d73662dc9ba0b40a8ce915f452..80b457124f2fe6e1e361aca5b6253904efee063c 100644 --- a/src/proto_alpha/lib_protocol/raw_context.ml +++ b/src/proto_alpha/lib_protocol/raw_context.ml @@ -1160,7 +1160,7 @@ let prepare_first_block ~level ~timestamp _chain_id ctxt = c.adaptive_issuance.global_limit_of_staking_over_baking; edge_of_staking_over_delegation = c.adaptive_issuance.edge_of_staking_over_delegation; - launch_ema_threshold = c.adaptive_issuance.launch_ema_threshold; + launch_ema_threshold = 0l; adaptive_rewards_params; activation_vote_enable = true; autostaking_enable = c.adaptive_issuance.autostaking_enable; 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 594b17134a0729acaaf813d4f0c0eb85cb9f95fd..327f955f7a3ab66918cacaf9262fa0acae307362 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 @@ -647,6 +647,16 @@ let test_deposits_unfrozen_after_deactivation () = let rec loop b n = if n = 0 then return b else + let* ai_activation_cycle = + Context.get_adaptive_issuance_launch_cycle (B b) + in + let frozen_deposits_when_deactivated = + match ai_activation_cycle with + | None -> Tez.zero + | Some cycle -> + if Cycle.(cycle > add root last_active_cycle) then Tez.zero + else initial_frozen_deposits + in let* b = Block.bake_until_cycle_end ~policy:(By_account account2) b in let* is_deactivated = Context.Delegate.deactivated (B b) account1 in let* frozen_deposits = @@ -664,7 +674,8 @@ let test_deposits_unfrozen_after_deactivation () = Assert.equal_tez ~loc:__LOC__ frozen_deposits - (if is_deactivated then Tez.zero else initial_frozen_deposits) + (if is_deactivated then frozen_deposits_when_deactivated + else initial_frozen_deposits) in loop b (pred n) in diff --git a/src/proto_alpha/lib_protocol/test/integration/test_adaptive_issuance_launch.ml b/src/proto_alpha/lib_protocol/test/integration/test_adaptive_issuance_launch.ml index 50f2cd2155a41f0fec6e68b2da774214d17b308b..ef4f67283c6932101461d8675d151edee7432050 100644 --- a/src/proto_alpha/lib_protocol/test/integration/test_adaptive_issuance_launch.ml +++ b/src/proto_alpha/lib_protocol/test/integration/test_adaptive_issuance_launch.ml @@ -590,17 +590,6 @@ let tests = (test_launch 1000000l (* This means that the threshold is set at 0.05% *) 88l); - Tztest.tztest - "the EMA reaches the vote threshold at the expected level and adaptive \ - issuance launches (realistic threshold, vote enabled)" - `Slow - (test_launch - Default_parameters.constants_test.adaptive_issuance - .launch_ema_threshold - 280894l - (* This vote duration is consistent with the result of the - unit test for this EMA in - ../unit/test_adaptive_issuance_ema.ml*)); Tztest.tztest "the EMA reaches the vote threshold at the expected level and adaptive \ issuance does not launch (very low threshold, vote disabled)" @@ -608,17 +597,6 @@ let tests = (test_does_not_launch_without_feature_flag 1000000l (* This means that the threshold is set at 0.05% *) 88l); - Tztest.tztest - "the EMA reaches the vote threshold at the expected level and adaptive \ - issuance does not launch (realistic threshold, vote disabled)" - `Slow - (test_does_not_launch_without_feature_flag - Default_parameters.constants_test.adaptive_issuance - .launch_ema_threshold - 280894l - (* This vote duration is consistent with the result of the - unit test for this EMA in - ../unit/test_adaptive_issuance_ema.ml*)); ] let () = 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 23fd8a4909f515c7c93c08eed7a93b0f6509445b..7b3a6b1d2504a7d714361dc18c4be0c80483a83e 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 @@ -62,7 +62,7 @@ "zk_rollup_max_ticket_payload_size": 2048, "global_limit_of_staking_over_baking": 5, "edge_of_staking_over_delegation": 2, - "adaptive_issuance_launch_ema_threshold": 1600000000, + "adaptive_issuance_launch_ema_threshold": 0, "adaptive_rewards_params": { "issuance_ratio_final_min": { "numerator": "1", "denominator": "400" }, "issuance_ratio_final_max": { "numerator": "1", "denominator": "10" }, 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 18fb176fa807c0dd212ef5ee792e3a229877e101..e3fcc9f9b786e88a016451a3b6dc859214a6244f 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 @@ -62,7 +62,7 @@ "zk_rollup_max_ticket_payload_size": 2048, "global_limit_of_staking_over_baking": 5, "edge_of_staking_over_delegation": 2, - "adaptive_issuance_launch_ema_threshold": 1600000000, + "adaptive_issuance_launch_ema_threshold": 0, "adaptive_rewards_params": { "issuance_ratio_final_min": { "numerator": "1", "denominator": "400" }, "issuance_ratio_final_max": { "numerator": "1", "denominator": "10" }, 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 e32252a663feab4e1d34363954dfed92052506b7..67dcdd688e7155afb284b508f0e6e50dbe36a741 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 @@ -62,7 +62,7 @@ "zk_rollup_max_ticket_payload_size": 2048, "global_limit_of_staking_over_baking": 5, "edge_of_staking_over_delegation": 2, - "adaptive_issuance_launch_ema_threshold": 1600000000, + "adaptive_issuance_launch_ema_threshold": 0, "adaptive_rewards_params": { "issuance_ratio_final_min": { "numerator": "1", "denominator": "400" }, "issuance_ratio_final_max": { "numerator": "1", "denominator": "10" }, diff --git a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_data_dir) RPC regression tests- adaptive_issuance.out b/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_data_dir) RPC regression tests- adaptive_issuance.out index 4f69a65ab9fda2905e76e7e338456b78649aac51..ad45f80f6fdecb4ad9a84a1d9e7f8a083ea4b5c4 100644 --- a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_data_dir) RPC regression tests- adaptive_issuance.out +++ b/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_data_dir) RPC regression tests- adaptive_issuance.out @@ -32,7 +32,7 @@ "80007812" ./octez-client rpc get /chains/main/blocks/head/context/adaptive_issuance_launch_cycle -null +5 ./octez-client rpc get /chains/main/blocks/head/context/issuance/expected_issuance [ { "cycle": 0, "baking_reward_fixed_portion": "333333", 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 fa4874fddcc188b0465d07fa6067a145b8bf5785..01b7d506f3afe0d243b50dbc504207baed613774 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 @@ -62,7 +62,7 @@ "zk_rollup_max_ticket_payload_size": 2048, "global_limit_of_staking_over_baking": 5, "edge_of_staking_over_delegation": 2, - "adaptive_issuance_launch_ema_threshold": 1600000000, + "adaptive_issuance_launch_ema_threshold": 0, "adaptive_rewards_params": { "issuance_ratio_final_min": { "numerator": "1", "denominator": "400" }, "issuance_ratio_final_max": { "numerator": "1", "denominator": "10" }, diff --git a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_rpc) RPC regression tests- adaptive_issuance.out b/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_rpc) RPC regression tests- adaptive_issuance.out index 4f69a65ab9fda2905e76e7e338456b78649aac51..ad45f80f6fdecb4ad9a84a1d9e7f8a083ea4b5c4 100644 --- a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_rpc) RPC regression tests- adaptive_issuance.out +++ b/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_rpc) RPC regression tests- adaptive_issuance.out @@ -32,7 +32,7 @@ "80007812" ./octez-client rpc get /chains/main/blocks/head/context/adaptive_issuance_launch_cycle -null +5 ./octez-client rpc get /chains/main/blocks/head/context/issuance/expected_issuance [ { "cycle": 0, "baking_reward_fixed_portion": "333333", 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 fa4874fddcc188b0465d07fa6067a145b8bf5785..01b7d506f3afe0d243b50dbc504207baed613774 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 @@ -62,7 +62,7 @@ "zk_rollup_max_ticket_payload_size": 2048, "global_limit_of_staking_over_baking": 5, "edge_of_staking_over_delegation": 2, - "adaptive_issuance_launch_ema_threshold": 1600000000, + "adaptive_issuance_launch_ema_threshold": 0, "adaptive_rewards_params": { "issuance_ratio_final_min": { "numerator": "1", "denominator": "400" }, "issuance_ratio_final_max": { "numerator": "1", "denominator": "10" }, diff --git a/tezt/tests/expected/baker_test.ml/Alpha- Baker rewards.out b/tezt/tests/expected/baker_test.ml/Alpha- Baker rewards.out index d6488bf8922d2bfa499f4618e077ee89cc033795..a2feb408a1b1d1c7ab63a7a17fe0c403468afc91 100644 --- a/tezt/tests/expected/baker_test.ml/Alpha- Baker rewards.out +++ b/tezt/tests/expected/baker_test.ml/Alpha- Baker rewards.out @@ -67,6 +67,7 @@ "contract": "[PUBLIC_KEY_HASH]", "change": "2999999", "origin": "block" } ], "liquidity_baking_toggle_ema": 0, "adaptive_issuance_vote_ema": 0, + "adaptive_issuance_activation_cycle": 5, "implicit_operations_results": [ { "kind": "origination", "balance_updates":